Erlang Idioms - A Pattern for an Erlang Programming Team

Steve Davis <>
Sat Feb 13 10:50:51 CET 2010


Hi Kenji,

Yes indeed! The choice of character encoding is a matter that goes
beyond text manipulation.

The idiom I use works when you already know what character encoding
you are dealing with.

As for dealing with different character encodings, I have been
experimenting with the use of tuple records defined as:
-record(text, {bin, charset = utf8, lang = 'us-en'}).

Kind regards,
Steve

On Feb 12, 11:51 pm, Kenji Rikitake <> wrote:
> In the message <>
> dated Fri, Feb 12, 2010 at 04:58:37PM -0800,
>
> Steve Davis <> writes:
> > While it may appear troublesome to type <<"hello">> rather than
> > "hello", the rewards in later manipulation is extreme.
>
> This generally only works for ASCII strings, though I agree with the idea.
>
> Erlang's Unicode representation of strings introduces a complication in
> this matter.http://erlang.org/doc/man/unicode.html
>


More information about the erlang-questions mailing list