ansel 2.0.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE +1 -1
- data/README.md +2 -7
- data/ansel.gemspec +4 -2
- data/lib/ansel/converter.rb +2 -2
- data/lib/ansel/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a438c0b694602e095a0be5413fee3dcd46de00243861cb9524f24a40b79f5910
|
4
|
+
data.tar.gz: 566a2b1f0f61f981daa498be57ce4d56d09d27bb821984385324bb8c5593746e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c78756e7f02448114ec87561b49972061b7e03156c49f5c54b99b2397daa5fa4346a473e229fe97620c3a9743556d132c92c0edc6fcd9696db84fd7b3e32492c
|
7
|
+
data.tar.gz: 0ef49f32f68a0b1ad5b42840692abf033288f32475a97ea5c88f8d4ab0a1420d2f36ae56086909c6d0baa0380eabdb1d90dea67c6284ffcf310009083b33c987
|
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -17,14 +17,9 @@ ANSEL provides character set conversion from ANSEL to UTF-8
|
|
17
17
|
|
18
18
|
ANSEL is compatible with the following Rubies:
|
19
19
|
|
20
|
-
* 2.2.x
|
21
|
-
* 2.3.x
|
22
|
-
* 2.4.x
|
23
|
-
* 2.5.x
|
24
|
-
* 2.7.x
|
25
|
-
* 3.0.x
|
26
20
|
* 3.1.x
|
27
21
|
* 3.2.x
|
22
|
+
* 3.3.x
|
28
23
|
|
29
24
|
If you need ANSEL conversion in Ruby 1.8, see my [ansel_iconv](http://github.com/infused/ansel_iconv) project.
|
30
25
|
|
@@ -54,7 +49,7 @@ standard.
|
|
54
49
|
|
55
50
|
## LICENSE
|
56
51
|
|
57
|
-
Copyright (c) 2006-
|
52
|
+
Copyright (c) 2006-2024 Keith Morrison <keithm@infused.org>
|
58
53
|
|
59
54
|
Permission is hereby granted, free of charge, to any person obtaining
|
60
55
|
a copy of this software and associated documentation files (the
|
data/ansel.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: ascii-8bit
|
2
2
|
|
3
|
-
lib = File.expand_path('
|
4
|
-
$LOAD_PATH.unshift lib unless
|
3
|
+
lib = File.expand_path('lib/', __dir__)
|
4
|
+
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
|
5
5
|
require 'ansel/version'
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
@@ -12,6 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = 'http://github.com/infused/ansel'
|
13
13
|
s.summary = 'Convert ANSEL encoded text to UTF-8'
|
14
14
|
s.description = 'Convert ANSEL encoded text to UTF-8'
|
15
|
+
s.license = 'MIT'
|
15
16
|
|
16
17
|
s.rdoc_options = ['--charset=UTF-8']
|
17
18
|
s.extra_rdoc_files = ['README.md', 'CHANGELOG.md', 'LICENSE']
|
@@ -19,4 +20,5 @@ Gem::Specification.new do |s|
|
|
19
20
|
s.require_paths = ['lib']
|
20
21
|
|
21
22
|
s.required_rubygems_version = '>= 1.3.0'
|
23
|
+
s.required_ruby_version = '>= 3.1.0'
|
22
24
|
end
|
data/lib/ansel/converter.rb
CHANGED
@@ -18,7 +18,7 @@ module ANSEL
|
|
18
18
|
scanner = StringScanner.new(string)
|
19
19
|
until scanner.eos?
|
20
20
|
byte = scanner.get_byte
|
21
|
-
char = byte.
|
21
|
+
char = byte.unpack1('C')
|
22
22
|
char_hex = char.to_s(16).upcase
|
23
23
|
|
24
24
|
case char
|
@@ -40,7 +40,7 @@ module ANSEL
|
|
40
40
|
end
|
41
41
|
else
|
42
42
|
output << utf16_to_utf8(ANSI_TO_UTF16_MAP['ERR'])
|
43
|
-
scanner.get_byte if scanner.get_byte.
|
43
|
+
scanner.get_byte if scanner.get_byte.unpack1('C') >= 0xE0 # ignore the next byte
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
data/lib/ansel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ansel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Convert ANSEL encoded text to UTF-8
|
14
14
|
email: keithm@infused.org
|
@@ -28,7 +28,8 @@ files:
|
|
28
28
|
- lib/ansel/converter.rb
|
29
29
|
- lib/ansel/version.rb
|
30
30
|
homepage: http://github.com/infused/ansel
|
31
|
-
licenses:
|
31
|
+
licenses:
|
32
|
+
- MIT
|
32
33
|
metadata: {}
|
33
34
|
post_install_message:
|
34
35
|
rdoc_options:
|
@@ -39,14 +40,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
39
40
|
requirements:
|
40
41
|
- - ">="
|
41
42
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
43
|
+
version: 3.1.0
|
43
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
46
|
- - ">="
|
46
47
|
- !ruby/object:Gem::Version
|
47
48
|
version: 1.3.0
|
48
49
|
requirements: []
|
49
|
-
rubygems_version: 3.
|
50
|
+
rubygems_version: 3.5.3
|
50
51
|
signing_key:
|
51
52
|
specification_version: 4
|
52
53
|
summary: Convert ANSEL encoded text to UTF-8
|