Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Charset stays the same for different languages

CityDesk allows a user to create translated versions of a site but doesn't let you set the charset for the different language versions. 

Same goes for date formatting, which should automatically be adapted to a given language version.

Is this an oversight or is there some way to overcome this?

Adam M
Wednesday, August 14, 2002

Hmm... looking through the joelonsoftware articles, I notice that the way around it is to code everything in UTF-8...

But how about automation of date formats?

Adam M
Wednesday, August 14, 2002

Ah, life is trickier than it appears! :)

All the little edit boxes in CityDesk (Headline, etc) are going to assume that you're editing in whatever charset is the default for your machine. On Win2K/XP you can change this; on Win 98/Me it depends on which national language version of Windows you bought.

You can set a corresponding charset in the template.

If different languages have different charsets, create a "multilingual variable" http://discuss.fogcreek.com/CityDesk/default.asp?cmd=show&ixPost=1710 for the charset tag itself and use this variable in the template.

The reason JoelOnSoftware uses UTF-8 is because it's produced with a development build of CityDesk 2.0 that I have on my desk. I have rigged it up so that CityDesk is 100% Unicode internally and always generates UTF-8 on output, which makes it possible to use just about any combination of languages anywhere and it all comes out right. Unfortunately CityDesk 2.0 is still a work in progress and it's just too buggy to release (for example, right now if you accidentally switch into HTML view it loses all the Unicode).

Joel Spolsky
Wednesday, August 14, 2002

Oh yeah, you also asked about date formatting. You probably know that you can setDateTimeFormat to change the date format to whatever language you want; unfortunately right now there is no way to do this automatically based on the language. For the global versions of Joel on Software I just punted and used dd/mm/yyyy which is understood everywhere outside the US, but we'll make it automatic in the next version.

Joel Spolsky
Wednesday, August 14, 2002

Hi all,

I'm testing Starter version for purposes of creation my web site and I have stron feeling that CityDesk does not perform any charset conversion ;-)

I'd like to stick to 8-bit encoding (no Unicode) and I cannot generate ISO-encoded standard page, because Windows runs on some fancy ANSI page, being not compatible with standarized encoding for Eastern European web pages (iso-8859-2).

Do you plan to build in support for other codepages in CD2.0 (for cnversion made during publishing) or I should develop tool which will perform conversion on content of CityDesk .cty database file?

Second option is stupid -- after publishing I'll have to reconvert  the site to ANSI back, or, when the CD2.0 appear, I'll have to download whole site back, convert and upload again.

What do you think about?

Best regards, Lukasz

Lukasz Pogoda
Saturday, August 24, 2002

*  Recent Topics

*  Fog Creek Home