Re: Unicode files ?
Dario Teixeira <[email protected]> Tue, 30 Mar 2010 12:36:44 -0700 (PDT)
| Newsgroups | gmane.comp.gnu.source-highlight.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, > An afterthought, and to get back to the original problem: The fact > that source-highlight users didn't stumble upon the unicode problem > earlier may be that AFAIK for source-highlight, a string from a source > file in means the same string out, without doing much more than pre- > and suffixing it with the appropriate tags (I'm oversimplifying here, > but that's my "good enough" mental model of how it works). > So, why does the OP experience this issue? As the output is HTML, may > it be that the HTML is simply bearing the wrong encoding in <head>? If > so, perhaps this can be fixed w/o much hassle around making > source-highlight Unicode capable? (Not a solution for eternity, though.) Actually, this is a consequence of what we've been discussing concerning the handling of variable-length encodings: as long as your processing is limited to string concatenation and copying, then the actual encoding is irrelevant. Variable-length encoding is only a factor if you need to do things such as strlen, extracting substrings, or accessing a character at position N. Nevertheless, I would presume that Source-highlight's processing is not limited to copies/concatenations, and therefore it may require encoding awareness. Is this true? Cheers, Dario Teixeira