• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to insert accented letters in JSF application

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have trouble to insert accented letters in a postgres database from a web application developed with netbeans.

The accented letters become sequeces of 2 or more characters.

Details:

Netabeans ver. 7.1
in faces-config.xml
...
<locale-config>
<default-locale>it_IT</default-locale>
</locale-config>
...

Postgres ver. 9.1
Database Properties:
Encoding WIN1252
Collation Italian_Italy.1252
Character Type Italian_Italy.1252

JSF Library Primefaces v. 3.0.RC2

How I have to configure Netbeans ond/or Postgres to work correctly with Italian alphabet?

Thank you very much.

Domenico


 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your brand of IDE should never have any influence on the webapp. For one thing, production webapps are far removed from the IDEs (if any) that produced them.

Locale actually doesn't control the character set encoding, though. Just the choice of resources. For example, messages in Italian would be the preferred return for resource lookups.

What you really need to look at is the Code Page in effect for the web pages themselves. UTF-8 is the most common, and it does have support for European accented Latin characters. However, for an exact match with your PostgreSQL settings, Code Page Windows-1252 would be the preferred setting, since that way the database and view would be using the exact same encoding.

Code Page Windows-1252 is very similar to the ISO-8859-1 Latin Unicode glyphset, with the most notable exception being things like the open and close-quote characters. ISO-8859-1 is actually preferable (even Microsoft recommends it these days). Non-Windows webclients such as Macintosh, Linux, and Android devices will be the most offended, otherwise.

It's unlikely that you can do anything about it at this stage, but it's worth noting that PostgreSQL's default codepage for database creation on Windows-based servers is CP-1252, but on the Unix systems, it's UTF-8.
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In NetBeans, when editing a .xhtml file, you should just be able to type the '&' character, and get a (very long) list of all the
available characters. Can you give this a try?

Regards,
Brendan.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic