Skip to content

Commit 634f539

Browse files
committed
use char2codepoint
1 parent ed58904 commit 634f539

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/unisec/properties.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ def self.codepoints(prop)
4444
# @example
4545
# Unisec::Properties.codepoints_display('Quotation_Mark')
4646
# # =>
47-
# # U+22 " QUOTATION MARK
48-
# # U+27 ' APOSTROPHE
47+
# # U+0022 " QUOTATION MARK
48+
# # U+0027 ' APOSTROPHE
4949
# # …
5050
def self.codepoints_display(prop)
5151
codepoints = Properties.codepoints(prop)
5252
codepoints.each do |cp|
53-
puts "U+#{cp[:codepoint].to_s(16).upcase.ljust(7)} #{cp[:char].ljust(4)} #{cp[:name]}"
53+
puts "#{Properties.char2codepoint(cp[:char]).ljust(7)} #{cp[:char].ljust(4)} #{cp[:name]}"
5454
end
5555
nil
5656
end

0 commit comments

Comments
 (0)