Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#41447 closed request (fixed)

port request: 'unicode' (with 'paracode')

Reported by: KurtPfeifle (Kurt Pfeifle) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port:

Description

'unicode' is a command line utility (written in Python) to query the Unicode database.

It works similar to the textproc/ascii package, but for unicode. To see what it can do, I provide a three small examples, which all produce the same output:

  • unicode 00E1
  • unicode á
  • unicode 'latin small letter a with acute'
 $>  unicode 00E1
      U+00E1 LATIN SMALL LETTER A WITH ACUTE
      UTF-8: c3 a1  UTF-16BE: 00e1  Decimal: á
      á (Á)
      Uppercase: U+00C1
      Category: Ll (Letter, Lowercase)
      Bidi: L (Left-to-Right)
      Decomposition: 0061 0301

Upstream sources here: http://kassiopeia.juls.savba.sk/~garabik/software/unicode/

Change History (5)

comment:1 Changed 10 years ago by KurtPfeifle (Kurt Pfeifle)

I forgot: you can also query a range of Unicode characters, using .. to separate upper and lower boundaries. The resulting output will be a nicely formatted table:

$  unicode 0450..0520

          .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F 
     040.  Ѐ  Ё  Ђ  Ѓ  Є  Ѕ  І  Ї  Ј  Љ  Њ  Ћ  Ќ  Ѝ  Ў  Џ  
     041.  А  Б  В  Г  Д  Е  Ж  З  И  Й  К  Л  М  Н  О  П  
     042.  Р  С  Т  У  Ф  Х  Ц  Ч  Ш  Щ  Ъ  Ы  Ь  Э  Ю  Я  
     043.  а  б  в  г  д  е  ж  з  и  й  к  л  м  н  о  п  
     044.  р  с  т  у  ф  х  ц  ч  ш  щ  ъ  ы  ь  э  ю  я  
     045.  ѐ  ё  ђ  ѓ  є  ѕ  і  ї  ј  љ  њ  ћ  ќ  ѝ  ў  џ  
     046.  Ѡ  ѡ  Ѣ  ѣ  Ѥ  ѥ  Ѧ  ѧ  Ѩ  ѩ  Ѫ  ѫ  Ѭ  ѭ  Ѯ  ѯ  
     047.  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.  Ԡ  ԡ  Ԣ  ԣ  Ԥ  ԥ  Ԧ  ԧ  Ԩ  ԩ  Ԫ  ԫ  Ԭ  ԭ  Ԯ  ԯ  
     053.  ԰  Ա  Բ  Գ  Դ  Ե  Զ  Է  Ը  Թ  Ժ  Ի  Լ  Խ  Ծ  Կ  
     054.  Հ  Ձ  Ղ  Ճ  Մ  Յ  Ն  Շ  Ո  Չ  Պ  Ջ  Ռ  Ս  Վ  Տ  
     055.  Ր  Ց  Ւ  Փ  Ք  Օ  Ֆ  ՗  ՘  ՙ  ՚  ՛  ՜  ՝  ՞  ՟  
     056.  ՠ  ա  բ  գ  դ  ե  զ  է  ը  թ  ժ  ի  լ  խ  ծ  կ  
     057.  հ  ձ  ղ  ճ  մ  յ  ն  շ  ո  չ  պ  ջ  ռ  ս  վ  տ  
     058.  ր  ց  ւ  փ  ք  օ  ֆ  և  ֈ  ։  ֊  ֋  ֌  ֍  ֎  ֏  
     059.  ֐   ֑   ֒   ֓   ֔   ֕   ֖   ֗   ֘   ֙   ֚   ֛   ֜   ֝   ֞   ֟  
     05A.   ֠   ֡   ֢   ֣   ֤   ֥   ֦   ֧   ֨   ֩   ֪   ֫   ֬   ֭   ֮   ֯  
     05B.   ְ   ֱ   ֲ   ֳ   ִ   ֵ   ֶ   ַ   ָ   ֹ   ֺ   ֻ   ּ   ֽ  ־   ֿ  
     05C.  ׀   ׁ   ׂ  ׃   ׄ   ׅ  ׆   ׇ  ׈  ׉  ׊  ׋  ׌  ׍  ׎  ׏  
     05D.  א  ב  ג  ד  ה  ו  ז  ח  ט  י  ך  כ  ל  ם  מ  ן  
     05E.  נ  ס  ע  ף  פ  ץ  צ  ק  ר  ש  ת  ׫  ׬  ׭  ׮  ׯ  
     05F.  װ  ױ  ײ  ׳  ״  ׵  ׶  ׷  ׸  ׹  ׺  ׻  ׼  ׽  ׾  ׿  

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

Thanks for the suggestion.

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I've added new ports "unicode" and "paracode" in r113585. Does that work for you?

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Updated the unicode port to use python33 in r113587, which fixes the error:

ValueError: unichr() arg not in range(0x10000) (narrow Python build)
The codepoint is too big.
Perhaps your python interpreter is not compiled with wide unicode characters.

comment:5 in reply to:  3 Changed 10 years ago by KurtPfeifle (Kurt Pfeifle)

Replying to ryandesign@…:

I've added new ports "unicode" and "paracode" in r113585. Does that work for you?

Oh yes, it works fine! :-)

$>  paracode -r -t mirror 'MacPorts is cool!'
         ¡looɔ sı̣ sʇɹoԀɔɐW

Thanks a lot for providing this new port so fast! I appreciate it very much.

Note: See TracTickets for help on using tickets.