[erlang-questions] unicode in string literals
Tue Jul 31 09:40:41 CEST 2012
The problem is that this is editor-dependent.
The one time I ran into problems with encoding was when editing a
perfectly normal file with Notepad+, which saves in utf8 unless you
dive into the settings and manage to tell it not to.
For people who need to support multiple OTP versions, including
those who maintain Open Source components, it would be a major
headache to have to maintain different file formats for different OTP
I vote for a compiler option, keeping Latin-1 as the default.
On 31 Jul 2012, at 09:05, Joe Armstrong wrote:
> Is "encoding(...)" a good idea?
> There are four reasonable alternatives
> a) - all files are Latin1
> b) - all files are UTF8
> c) - all files are Latin1 or UTF8 and you guess
> d) - all files are Latin1 or UTF8 or anything else and you tell
> Today we do a).
> What would be the consequences of changing to b) in (say) the next
> major release?
> This would break some code - but how much? - how much code is there
> with non Latin1 printable characters
> in string literals? - it should be easy to write a program to test for
> this and flag sting literals that
> might causes problems if the default convention was changed.
Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
More information about the erlang-questions