Character set conversions

"Jérôme M. Berger" jeberger at free.fr
Mon May 30 10:57:32 PDT 2011


Adam D. Ruppe wrote:
> Kagamin wrote:
>> May be, it's his cgi lib? :)
>> Client is free to send requests in any encoding, I suppose.
> 
> In practice, that hasn't been a problem because browser tend to
> send requests in the same encoding as the html you served.
> 
> Since the D always outputs utf8, the browsers all send back utf8
> too.
> 
> 
> The first problem I had was users can upload csv files, which they
> generally make in Excel... which apparently outputs Windows-1252.
> Fine for 99% of text, but then someone puts in a curly quote or
> an em dash and it throws an invalid utf 8 sequence.
> 
> Converting that is easy enough though.
> 
	Fun fact about Excel generated CSV files: quite apart from encoding
issues, the separator used between cells depends on the locale: for
example, in English locales it uses a coma but in French locales it
uses a semicolon...

	Just thought I'd point it out in case you did not know.

		Jerome
-- 
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110530/829a870c/attachment.pgp>


More information about the Digitalmars-d mailing list