• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Problem in MySql with special characters.

 
Ranch Hand
Posts: 144
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have defined a mysql table with CHARACTER SET 'latin1' COLLATE 'latin1_general_ci' for accept special characters, for instance - Lúcia, Conceição -  some time ago I managed to write the column a name of special character but now the name Lúcia is writenn as Lúcia. The question is, how to define collation to accept special characters?
I have two fields type that send to mysql, jsp input field and jsp textarea field.
Thanks.
 
Saloon Keeper
Posts: 5916
152
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

now the name Lúcia is writenn as Lúcia


Where is it written like that? Keep in mind that many text consoles can not handle non-ASCII characters.
 
Saloon Keeper
Posts: 21311
140
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your table is defined to accept and collate on a character set that supports Portuguese, then probably your data is OK, but whatever software you are using to display it hasn't been told to use the same character set (code page).
 
Cezar Apulchro
Ranch Hand
Posts: 144
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Netbeans to develop and Glassfish as server.
 
Tim Moores
Saloon Keeper
Posts: 5916
152
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:Where is it written like that?

 
Cezar Apulchro
Ranch Hand
Posts: 144
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is written in my mysql table and in my jsp table when I load to table.
 
Saloon Keeper
Posts: 10873
234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you output the value to JSP, print the byte sequence to your output window like this:

Share the byte sequence with us.

If the sequence correctly encodes "Lúcia", the problem is that your web page doesn't interpret the string correctly. Otherwise, you stored the wrong value in the database.
 
Cezar Apulchro
Ranch Hand
Posts: 144
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, this is a java class that I took on the web to see the generated content but is not showing any. Where am I going wrong?
 
Cezar Apulchro
Ranch Hand
Posts: 144
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved the problem of accentuation for portuguese, in my input fields the special characters like ç, ^, ´, are being shown as they should, but in my jsp table are not working.
I used the command:

As I said input fields and table mysql are ok.
Thanks.
 
Stephan van Hulst
Saloon Keeper
Posts: 10873
234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good job solving it, have a cow!
 
Cezar Apulchro
Ranch Hand
Posts: 144
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to close this contact?

Problem is solved.

Thanks.
 
Tim Holloway
Saloon Keeper
Posts: 21311
140
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's been marked solved. Nothing more to do.
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!