POV-Ray : Newsgroups : povray.off-topic : The trouble with XSLT : Re: The trouble with XML Server Time
29 Jul 2024 16:24:25 EDT (-0400)
  Re: The trouble with XML  
From: clipka
Date: 5 Mar 2012 14:10:57
Message: <4f550fc1$1@news.povray.org>
Am 05.03.2012 19:19, schrieb Orchid Win7 v1:
>>>> What part of "get a decent text editor" didn't you understand? :-P

> In all seriousness though. I could probably just configure my editor to
> always use UTF-8. That still doesn't solve the problem of typing obscure
> characters in the first place.

Did you know that good text editors allow you to define your own fancy 
keystroke combinations? So you can place your favorite special 
characters on some easily memorizable combo of Alt-Shift-Explode or 
whatever suits your needs.

> And it still doesn't change the fact that
> as soon as I open the file in any other program, it's going to break
> because that other program doesn't know what the hell character encoding
> to use.

That's plain stupid nonsense. A non-UTF-8-aware text editor (or any 
other piece of software capable of processing extended-ASCII text files) 
confronted with a UTF-8 text file will display apparently random stuff 
in place of any non-ASCII characters, but that random stuff saves fine, 
and parses back as later UTF-8 without problem. Just make sure you don't 
insert non-ASCII characters in the troublesome editor, and don't insert 
anything into that random stuff.

This property is one of the fun things about UTF-8: Anything that can 
handle at least /one/ extended-ASCII codepage can also handle UTF-8 
transparently without even knowing.

(You /will/ get into trouble though if your <?xml ...?> declaration 
doesn't match the actual character encoding of the file, but I guess 
that should be obvious.)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.