473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Charsets on multi-language website

I recently discovered that the web server I use has started to specify
Latin-1 as the default charset, with the result that my Greek, Russian,
Persian, etc pages failed to display properly. I had previously used
the deprecated <META ... charset ...> header tags, which worked for a
time -- presumably because the server didn't originally specify a
default charset.

My learning curve over the last few days has been quite steep: thank
you, Alan, Jukka et al (how are things, Al?) for your useful & clearly
expressed postings on this topic.

I had assumed -- erroneously -- that charset/encoding instructions
acted something like CSSs, with specifications on a webpage overriding
any centrally-specified default.

FWIW, & in the hope that it may be useful for someone in the same
position, here is the (Apache) .htaccess file I finally came up with:

AddCharset UTF-8 .htm
<Files ~ "^g(reek|s|c).+\.htm$">
AddCharset Windows-1253 .htm
</Files>
<Files ~ "^ro.+\.htm$">
AddCharset Windows-1250 .htm
</Files>
<Files ~ "^ru?s.+\.htm$">
AddCharset Windows-1251 .htm
</Files>
<Files ~ "^t(ur|s).+\.htm$">
AddCharset Windows-1254 .htm
</Files>

It looks a bit messy, & if I were starting from scratch I would have
organized the files into language folders. But the file may be of
interest as a sort of template. Briefly, for the benefit of anyone
unfamiliar with the format:

1. I start by making UTF-8 the default encoding.

2. I specify the encodings for Greek, Romanian, Russian and Turkish, in
that order.

3. I use regular expressions to cover the file names for each language
(of course these should have been rationalized, but I didn't want to
have to rewrite hundreds of links!).

HTH someone ...

Nigel

--
ScriptMaster language resources (Chinese/Modern & Classical
Greek/IPA/Persian/Russian/Turkish):
http://www.elgin.free-online.co.uk

Sep 10 '05 #1
0 1401

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mrT | last post by:
Without any experience outside of regular European / Unicode charsets, I'm a bit stuck with a PHP app that needs to be able to handle foreign characters. I've got the content-type header...
0
by: Tux | last post by:
I use Mandrake 9.1 and Eclipse works just fine but there is a warning that I don't know what that mean and how to fix it: Missing charsets in String to FontSet conversion
0
by: mikeswk | last post by:
Hi, all I'm using jsp to connect to mysql 3.23.44 max using connector 3.0.6 (default charset=latin1) I'm trying to put some multi-byte characters (for example big5) together with latin...
0
by: Francesco Moi | last post by:
Hello. I want to find out the charsets supported by DataBase. I tried "SHOW CHARACTER SET" but I get this error: --------------- mysql> SHOW CHARACTER SET; ERROR 1064: You have an error in...
0
by: Rasmus Rimestad | last post by:
Hello! I have developed an internet application in PHP/mySQL which is now getting internationalised and will start to contain information from contries like Poland, Hungary, Czech Republic etc....
12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
5
by: bobwansink | last post by:
Hi, I'm relatively new to programming and I would like to create a C++ multi user program. It's for a project for school. This means I will have to write a paper about the theory too. Does anyone...
0
by: dave | last post by:
I am trying to resolve the following mysql error: File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 22) Character set '#33' is not a compiled character set and is not specified in the ...
0
by: jose | last post by:
I use the WinHttp.WinHttpRequest.5.1 object from a asp .net page to get the content of another asp .net page. I set a cookie in the object. The value of that cookie is 'Ñadf'. But the cookie is...
0
by: jose | last post by:
I use the WinHttp.WinHttpRequest.5.1 object from a asp .net page to get the content of another asp .net page. I set a cookie in the object. The value of that cookie is 'Ñadf'. But the cookie is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.