ruby - Carmen Gem giving special characters -


i using carmen gem countries , respective states.but, when use carmen::country.named("sri lanka").subregions.collect{|p| p.name}, getting array:

["basnāhira paḷāta",  "madhyama paḷāta",  "dakuṇu paḷāta",  "uturu paḷāta",  "næ̆gĕnahira paḷāta",  "vayamba paḷāta",  "uturumæ̆da paḷāta",  "Ūva paḷāta",  "sabaragamuva paḷāta"] 

and after using i18n, getting:

["basnahira pa?ata",  "daku?u pa?ata",  "madhyama pa?ata",  "nae?genahira pa?ata",  "sabaragamuva pa?ata",  "uturu pa?ata",  "uturumae?da pa?ata",  "uva pa?ata",  "vayamba pa?ata"] 

with ? replacing special characters.

transliterate changes non ascii characters ascii characters approximations, characters there no approximations replaced ?. this explained in docs. if not want do, not want use transliterate method.

if want write own transliteration approximations (from docs linked to):

i18n:   transliterate:     rule:       ü: "ue"       ö: "oe" 

Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -