[erlang-questions] Downcase Accented characters

Yurii Rashkovskii <>
Mon Oct 22 00:02:36 CEST 2012


Roberto,

You might be able to achieve what you need by using one isolated bit of 
Elixir's distribution — String.Unicode module.

it is compiled right off UnicodeData.txt so it has all the necessary data 
embedded, thus saving you from talking to gen_servers or ETS tables.

And the best part is that you don't really need Elixir itself to be able to 
use it:

You can 
edit https://github.com/elixir-lang/elixir/blob/master/lib/elixir/priv/unicode.ex 
and rename it from String.Unicode to, say, :string_unicode (to be visually 
native to erlang's code) and after the compilation you'll get a beam file 
you can use independently from Elixir because it doesn't use anything from 
the elixir application.

Hope you'll find this helpful.

On Sunday, October 21, 2012 12:14:47 PM UTC-7, Roberto Ostinelli wrote:
>
> Dear list,
>
> I've a binary string which includes accented characters and unicode, that 
> i need to downcase.
>
> Is my real best option here to convert everything to list and downcase 
> that?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121021/f28ce1ab/attachment.html>


More information about the erlang-questions mailing list