473,788 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hebrew support -- please help !

Hi all,

I develop an application (JAVA/JSP) on RedHat PostgreSQL 7.4.3 with PostgreSQL 7.4.2 JDBC3 with SSL (build 213).

This application needs to serve pages in LATIN1 and Hebrew.
For that I create 2 Databases, one DB in UNICODE encoding with client encoding LATIN1 when in the JSP the charset encoding is iso-8859-1 and it's working fine from client to server and server to client.

so I decide to do the same thing with Hebrew -- DB in UNICODE with client encoding ISO-8859-8 when in the JSP the charset encoding is iso-8859-8, then I got strange characters.

I also tried to create DB in UNICODE encoding with client encoding UNICODE when in the JSP the charset encoding is UNICODE, but same problem I got strange characters.

Does someone have a solution or a way to resolve this problem.

Elie
---------------------------------
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
Nov 23 '05 #1
7 2865
> Hi all,

I develop an application (JAVA/JSP) on RedHat PostgreSQL 7.4.3 with PostgreSQL 7.4.2 JDBC3 with SSL (build 213).

This application needs to serve pages in LATIN1 and Hebrew.
For that I create 2 Databases, one DB in UNICODE encoding with client encoding LATIN1 when in the JSP the charset encoding is iso-8859-1 and it's working fine from client to server and server to client.

so I decide to do the same thing with Hebrew -- DB in UNICODE with client encoding ISO-8859-8 when in the JSP the charset encoding is iso-8859-8, then I got strange characters.

I also tried to create DB in UNICODE encoding with client encoding UNICODE when in the JSP the charset encoding is UNICODE, but same problem I got strange characters.

Does someone have a solution or a way to resolve this problem.


If I understand correctly, JDBC driver issues "set client_encoding to
iso-8859-8" in your case. You should check it first. If it does the
right thing, then you might want to the conversion maps. They are located:

src/backend/utils/mb/Unicode/utf8_to_iso8859 _8.map // UNICODE(UTF-8) -> ISO-8859-8
src/backend/utils/mb/Unicode/iso8859_8_to_ut f8.map // ISO-8859-8 -> UNICODE(UTF-8)

If you find anything wrong, please let me know.
--
Tatsuo Ishii

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #2
Hi Elie,
I develop an application (JAVA/JSP) on RedHat PostgreSQL 7.4.3 with
PostgreSQL 7.4.2 JDBC3 with SSL (build 213). This application needs to serve pages in LATIN1 and Hebrew.
For that I create 2 Databases, one DB in UNICODE encoding with client
encoding LATIN1 when in the JSP the charset encoding is iso-8859-1 and
it's working fine from client to server and server to client. so I decide to do the same thing with Hebrew -- DB in UNICODE with client
encoding ISO-8859-8 when in the JSP the charset encoding is iso-8859-8,
then I got strange characters. I also tried to create DB in UNICODE encoding with client encoding UNICODE
when in the JSP the charset encoding is UNICODE, but same problem I got
strange characters. Does someone have a solution or a way to resolve this problem.


Are you sure your client side display and fonts are set correctly? Can you look at the ASCII codes you get back from Postgres to make sure they are not the correct Hebrew characters. You can send me some strings you got by email and I'll look at it if you want.

Bye,

Guy.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #3
Hi Elie,

actually it is much simpler if you use Unicode encoding on both sides.
Anyway, where do you see the strange characters? If you look at your DB
through commandline psql it is crucial to have the correct encoding.

I use to work on the commandline of my Linux box. I log in via putty,
which on a Win98 Machine is not capable of displaying unicode characters
correctly.

Ulrich
--
------------------------------------------------------------
Relevant Traffic AB, Riddargatan 10, 11435 Stockholm, Sweden
Tel. +46-8-6789750 http://www.relevanttraffic.se
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #4
Hi Guy,
Are you sure your client side display and fonts are set correctly?
Yes, I can display Hebrew font.
Can you look at the ASCII codes you get back from Postgres to make sure they are not the correct Hebrew characters.


I use pgAdmin3 on W2K to insert row in Hebrew and can see the right character.

My /etc/sysconfig/i18n file:
LANG="en_US.UTF-8"
SUPPORTED="fr_F R.UTF-8:fr_FR:fr:en_U S.UTF-8:en_US:en"
SYSFONT="latarc yrheb-sun16"

Now I tried this configuration:
* DB in UNICODE, 'set client_encoding to UNICODE'
* Apache 2.0 + mod_jk2: don't see any encoding
* Tomcat 5: javaEncoding to UTF8 (default value)
* In each JSP:
<%@ page contentType="te xt/html;charset=ut f-8" language="java" %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Now I got the right information from the DB in Hebrew and french.
Still can't save value in Hebrew from client (browser) to server and in french if I save 'été' in a column varchar(3) I got a range over exception.

What happen here ! something else to config ?

Elie
---------------------------------
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
Nov 23 '05 #5
> Now I got the right information from the DB in Hebrew and french.
Still can't save value in Hebrew from client (browser) to server and
in french if I save 'été' in a column varchar(3) I got a range over
exception.

What happen here ! something else to config ?
This is a Tomcat question...

When processing forms set the encoding of the form element using the
following attribute (in addition to all that you are doing):

enctype= "text/plain;charset=U TF-8"

eg <form action="blah" ... enctype= "text/plain;charset=U TF-8">

Also add a hidden field with special/accented characters in all your
forms. Query the parameter value (of the hidden field) in your
servlet/filter/jsp to see what you actually got. It could be that the
browser didn't respect your encoding, and you don't get back what you
put there in the first place!

Hope that helps.

John Sidney-Woollett

Elie Nacache wrote:
Hi Guy,

Are you sure your client side display and fonts are set correctly?

Yes, I can display Hebrew font.

Can you look at the ASCII codes you get back from Postgres to make sure they are not the correct Hebrew characters.

I use pgAdmin3 on W2K to insert row in Hebrew and can see the right character.

My /etc/sysconfig/i18n file:
LANG="en_US.UTF-8"
SUPPORTED="fr_F R.UTF-8:fr_FR:fr:en_U S.UTF-8:en_US:en"
SYSFONT="latarc yrheb-sun16"

Now I tried this configuration:
* DB in UNICODE, 'set client_encoding to UNICODE'
* Apache 2.0 + mod_jk2: don't see any encoding
* Tomcat 5: javaEncoding to UTF8 (default value)
* In each JSP:
<%@ page contentType="te xt/html;charset=ut f-8" language="java" %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Now I got the right information from the DB in Hebrew and french.
Still can't save value in Hebrew from client (browser) to server and in french if I save 'été' in a column varchar(3) I got a range over exception.

What happen here ! something else to config ?

Elie
---------------------------------
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #6
Hi Elie,
Now I got the right information from the DB in Hebrew and french.
Still can't save value in Hebrew from client (browser) to server and in
french if I save 'été' in a column varchar(3) I got a range over exception.


you are working through the web. That makes the whole thing a lot more
complex. Try to use UTF-8/UNICODE encoding all the way. That means
configure Apache(!!!) and Tomact to server pages in UTF-8 encoding.
All web pages pages should have

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Check in your browser if UTF-8 encoding is used. On the other operating
system in IE use View > Encoding, it should show UTF-8.

Actually the browser to server communication is the hardest to ensure
the right encoding is used.

We have a database with Japanese, Hebrew, German, Swedish, French,
Spanish and English content.

Ulrich

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #7
Hi Ulrich

Finally I resolve the problem.

Here is the solution:
DB server side:
===========
* DB encoding UNICODE
* DB client encoding UNICODE

JSP side:
=======
* <%@ page contentType="te xt/html;charset=UT F-8" language="java" %>
* <%@ page pageEncoding="I SO-8859-1"%>
* request.setChar acterEncoding(" UTF-8");
* <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Tomcat side: (server.xml file)
=========
<Connector port="8009" enableLookups=" false" redirectPort="8 443" debug="0"
protocol="AJP/1.3" URIEncoding="UT F-8"/>

For those that use a property bunle file (key/value) you need to save this file in
ISO-8859-1. if you have unicode characters in it you have to convert the file with native2ascii tool.

Thanks to all,
Elie
---------------------------------
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
Nov 23 '05 #8

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

Similar topics

5
2696
by: Mr. x | last post by:
Hello, I am building a web-site. For a reason, I don't know why, if I put my site on my computer - I see hebrew character fine, but when I put my site on hosting company I don't see hebrew character. In my html page there is a line in the head section : <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
2
2526
by: Ben Kayam | last post by:
Hello, I have a hebrew string that include numbers and other letters, i need to revere only the hebrew fonts. somebody told me using the bidi. please help me.
0
1167
by: Julia | last post by:
Hi, I am trying to POST values from WINFORM application to ASP(not ASP.NET) page,which save them in ACCESS data base(support unicode) The values contains Hebrew and English characters no matter what encoding I use,I could not figure lout how to pass the Hebrew characters I understand that WebClient internally uses UTF8 inetersting...in order to debug it,thge ASP return a string which contains all values which was passed to it
0
1195
by: Sim Zacks | last post by:
I read the recent posts about Hebrew support already and I am having a similar problem, but with an MS Access front end. The database is Unicode encoded. I can input Hebrew, query in hebrew and view hebrew from the PGAdmin III query tool. However in MS Access, when I type hebrew it changes to all ??? and when I view a record input through the PGAdmin it looks like gibberish. Any thoughts?
6
1524
by: David Thielen | last post by:
Hi; I understand that HTMLDirectionality sets the direction for the <html> tag. But what about text within the page, especially text that is mixed (rtl and ltr)? Doesn't it need the <span dir='LTR'>...</span> for the ltr parts? And if so, how is this best done? -- thanks - dave
40
3122
by: Shmuel (Seymour J.) Metz | last post by:
I'd like to include some Hebrew names in a web page. HTML 4 doesn't appear to include character attributes for ISO-8859-8. I'd prefer avoiding numeric references, e.g., "&#x05E9;&#x05DE;&#x05D5;&#x05D0;&#x05DC;". Is there currently a standardized set of character attributes for Hebrew? If so, is there a downloadable set of definitions for those attributes? Thanks. --
1
1233
by: Souloron | last post by:
Here what I did: string cmdText = String.Format(("CREATE TABLE {0} (dno int primary key, Sunday char(5), Monday char(5), Tuesday char(5), Wednesday char(5), Thursday char(5), Friday char(5))"), tableName); OleDbConnection conn = new OleDbConnection(Form1.ConnectionString); conn.Open(); OleDbCommand cmd = new OleDbCommand(cmdText, conn); ...
2
3012
by: Mitul | last post by:
Hello Friend, I am having very strange problem with mail function. As I have to implement Newsletter things in my hebrew site. I have implemented everything but having problem with subject line is not display on any one of mail services. Mail display body part properly in hebrew but subject line having problem its display junk character in subject. I am not able figure out what is the actual problem. Please help me for this matter.
4
3511
by: ofiras | last post by:
Hi everyone, I made a web page in PHP, and included in it PHP file, which prints Hebrew text. I used the web page to include other files, but only this particular PHP file makes my Hebrew look like gibberish ("׳‘׳—׳¨ ׳�׳™׳§׳•׳� ׳â€×³â€œ×³Â£ ׳‘׳™׳� ׳â€×³â€œ×³â‚ª×³â„¢×³ï¿½") even in the source code, and only on the text he prints (I print Hebrew in the web page itself, before and after the included PHP, and...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
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...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
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...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
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...
1
4070
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
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.