[prev in list] [next in list] [prev in thread] [next in thread] 

List:       graphviz-interest
Subject:    [graphviz-interest] dot -Tsvg does not check what encoding
From:       graphviz-2006Q1 () ryandesign ! com (Ryan Schmidt)
Date:       2006-01-18 19:49:39
Message-ID: 2D6D60F3-2B37-4755-94BF-4C3025F78170 () ryandesign ! com
[Download RAW message or body]


On Jan 18, 2006, at 22:13, Emden R. Gansner wrote:

> Ah, sorry, I missed that distinction. That's probably not going to  
> have a perfect
> solution, since who knows what charset the user name might be in?

That's probably true. I haven't give much thought to the matter. Are  
there flavors of Unix which store users' real names in weird  
charsets? Latin 2? Shift-JIS? I don't know, and I don't know how to  
find out either. Anyone on this list use such an OS? :-)

> I suppose we can at least verify that the string is valid UTF-8 and  
> if not,
> don't put it into the output.

Could do that... Could also say that, just like dot files, you  
support UTF-8 and Latin 1, and that's it. So if the username or real  
name doesn't validate as UTF-8, assume it's Latin 1 and convert from  
that to UTF-8. Though if, as asked above, there are other charsets in  
use for users' real names within OSes, then assuming Latin 1 may lead  
to more silliness.

In fact I'm not sure why the username needs to be in the SVG comments  
at all. :-) It's not like it's embedded into dot-produced PNGs, image  
maps, reformatted dot files, etc.

> And if charset=Latin1, we could assume that is also the charset for  
> the
> user name and do the translation.

That I wouldn't do; I don't see any relationship between the charset  
of the username and the charset of the dot files, so I wouldn't  
handle them the same way, not controlled by the same parameter. In  
particular, the charset the OS chooses to use to represent the user's  
real name is not something the user can influence, whereas the  
charset of the dot files' contents is very much under the user's  
control.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic