You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nikola Milutinovic <Ni...@ev.co.yu> on 2001/12/03 20:57:08 UTC

Page encoding problem

Hi all. I'm having a bit of an page encoding problem. I'm trying to use 
ISO-8859-2 (a.k.a. Latin-2) page encoding and something is going wrong.

I have a page that wascreated first as HTML, with ISO-8859-2 encoding. This page 
displays OK under Dreamweaver 4 and web browsers.

Then I added JSP directives and converted it to a JSP page. The problem is that 
all text characters specific to our alphabet, from Latin-2 extended ASCII set, 
are displayed as "?".

The question mark is not browser's inability to display something - it is really 
a "?". Why is this happening?

What is more disturbing is that all data in my database, which is correctly 
entered both with LATIN2 and UNICODE encodings (I have two databases under 
PostgreSQL) also exibits this behaviour.

Could this be JDK issue? Could it be connected to i18n (internationalization) 
support under my OS.

I find it hard to believe that BOTH PostgreSQL JDBC driver AND Tomcat are at 
fault here. Any help?

OS: Digital UNIX 4.0D on Alpha
JDK/JRE: DEC/Compaq JDK 1.3.0 for Digital UNIX/Alpha
Tomcat: 4.01
Database: PostgreSQL 7.1.3

TYIA,
Nix.



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Page encoding problem

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> It is impossible to say what you are doing wrong if you do not include your 
> code.  I use full internationalization on all my jsp pages with no 
> problem.  But, I don't know what your "encoding" code is.

I'll have to get back to you - it started working.

The "only" thing I did was set UNIX LOCALE to sl_SI.ISO8859-2. The funny thing is it is not beahving like ISO-8859-2 is the default encoding. It is still ISO-8859-1, but now when I set contentTpe to "text/html; charset=ISO-8859-2" the page displays OK. Looks like DEC's JVM is nailed to ISO-8859-1 *if the LOCALE is set to "C"*. If it is set to something from the i18n "menu", other encoings, localizations, etc. kick in.

Shucks! I just waisted a couple of weeks on that matter...

Nix.

Re: Page encoding problem

Posted by Micael Padraig Og mac Grene <ca...@harbornet.com>.
At 08:57 PM 12/3/01 +0100, you wrote:
>Hi all. I'm having a bit of an page encoding problem. I'm trying to use 
>ISO-8859-2 (a.k.a. Latin-2) page encoding and something is going wrong.
>
>I have a page that wascreated first as HTML, with ISO-8859-2 encoding. 
>This page displays OK under Dreamweaver 4 and web browsers.

It is impossible to say what you are doing wrong if you do not include your 
code.  I use full internationalization on all my jsp pages with no 
problem.  But, I don't know what your "encoding" code is.

-- micael


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>