[erlang-questions] character output problems

Magnus Klaar <>
Sat Apr 7 01:20:20 CEST 2012


It looks like your input is being converted to a multibyte character
encoding (such as utf-8, which we're most likely looking at in the second
version) on its way from your brower, via the database and back to your
browser. I must admit that i'm no expert and i did have to double check the
terminology on wikipedia, but both the Ä and Å characters in the output has
an extra character tucked on, coincidentally these two characters are
encoded as 196 and 197 in latin1, both valid values for a "leading byte"
which are expected to be followed by one "continuation byte".

TLDR; Are you declaring the correct charset in your markup?

MVH Magnus

On Fri, Apr 6, 2012 at 10:42 PM, Wes James <> wrote:

> When putting some data in to riak or postgresql the data coming out
> isn't right. For instance the text going in to the database is:
> Ekologie lučních porostů
> But when a search is done on the data (via cowboy), the results coming
> out look like:
> Ekologie luÄ ních porostů
> When I was working with lists in the past (using yaws), it seemed to
> work, but the results coming out are binaries and I think the binary
> representation is causing the problem or converting from binary is
> causing the problem.  Is there a way to fix this?
> When looking at the data in psql it looks right.
> Thanks,
> -wes
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120407/c6f70162/attachment.html>

More information about the erlang-questions mailing list