473,604 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Chinese - German character woes in JSP

Having a problem displaying both german and chinese characters from a
UTF-8 database on the same *.jsp page.

Can make Chinese characters appear correctly by including the following
lines:

<%@ page pageEncoding="U TF-8" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
However, if I include the <meta> tag it then makes special german
characters unreadable. If I remove the <meta> tag German characters
display properly but Chinese characters do not.

We are trying to display them on the same page, because ultimately
Chinese and German will be served on the same site.

TIA,
Jeff

Jul 17 '05 #1
1 4749
Jeff wrote:
Having a problem displaying both german and chinese characters from a
UTF-8 database on the same *.jsp page.

Can make Chinese characters appear correctly by including the following
lines:

<%@ page pageEncoding="U TF-8" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
However, if I include the <meta> tag it then makes special german
characters unreadable. If I remove the <meta> tag German characters
display properly but Chinese characters do not.

We are trying to display them on the same page, because ultimately
Chinese and German will be served on the same site.

TIA,
Jeff


How are your German texts being generated? If they are coming from Java
strings and UTF-8 encoding is specified, then everythig should work. If
however you're fetching 8-bit German text out of a file or a database then
somewhere along the line you need to translate from ISO 8859-1 to UTF-8.
Check that your default encoding is set to UTF-8 and that all your
conversions between byte[] and String are kosher.

If you consistently use UTF-8 and the web browser is not totally broken
(big "if"!) then it should be perfectly possibly to mike German and Chinese.

--
Chris Gray ch***@kiffer.eu net.be

Jul 17 '05 #2

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

Similar topics

3
3222
by: Coco | last post by:
Hi! I managed to display chinese character in my web form (.aspx), in certain situation i need to to set the text of the label of my web form in chinese character programatically which is done in my code behind. when running the web form, the character which is entered directly to the web form during design time is displayed correctly, while those set from code behind appear as funny character
6
22234
by: Zhang Weiwu | last post by:
Hello. I am working with a php software project, in it (www.egroupware.org) Chinese simplified locate is "zh" while Traditional Chinese "tw". I wish to send correct language attribute in http header, I found "zh" is not standard. I found this line in apache2's default httpd.conf # Simplified Chinese (zh-CN) AddLanguage zh-CN .zh-cn
8
3480
by: Agnes | last post by:
In my .net ,i need to generate an xml file , however, user may input a chinese character, Then , the xml will got something unknow characters. the following is my code, Does anyone know how to solve it ?? Private Sub Init() With AMSXML ..Formatting = Formatting.Indented ..Indentation = 4 ..IndentChar = " " ..WriteStartDocument()
8
11952
by: pabv | last post by:
Hello all, I am having a few issues with encoding to chinese characters and perhaps someone might be able to assist. At the moment I am only able to see chinese characters when displayed as part of a datagrid. When an input textbox is displayed it does not display chinese characters, but rather the unicode characters stored in the mssql 2000 server backend.
1
2856
by: CYF | last post by:
My Computer : Window XP Pro English Version -> I have set the "Regional" to "Taiwan" Mysql 4.1.x -- > set to big5 already i am using C# to program. When i retrieve chinese character from the mysql database, the chinese character will become "????". Alternatively, when i insert the chinese character from the program to the database, those chinese character will become symbols too.
12
3219
by: Steven Nagy | last post by:
Hi all, I have to do a website in chinese! Basically I just need to know how to output chinese characters. I am assuming its very easy, but have never done it before. I can however do simple things like changing the formats of currency and calendars and so on. I am guessing the answer is quite simple given; I assume Unicode would support all the chinese characters right? Ideally I'd like them to be able to enter their own content...
1
2433
by: lyudmilal | last post by:
I have a list of last names that can be in different languages: chinese, english, russian, german, etc. Different format need to be applied only for last names in chinese. For this purpose, I need to check if last name contains chinese characters. Any ideas how to do it (it should be data related check)? Thank you, Ludmila
0
1796
by: alexsink | last post by:
I am trying to get apache content negotiation to redirect only zh-CN(mainland China, where Simplified Chinese translations are available) language types to Chinese web pages, and have all other variants of Chinese language tags(ie zh-TW) point to English-suffix pages. Our site currently has content negotiation set up for several other languages, and we have the corresponding html files for those languages being properly served. After...
1
2256
by: greggorob64 | last post by:
Hello, I am working with a system developed several years ago, and was recently internationalized to support unicode languages. I am running into a very frustrating and challenging problem: In 99% of the textboxes, entering chinese (or japanese or arabic) characters (using windows IME), in any amount and length, will show up and puts random characters int he textbox (sometimes '?', sometimes a box, sometimes a different chinese char,...
0
8419
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8409
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8280
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6739
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5882
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3907
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3955
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2434
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1526
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.