cancel
Showing results for 
Search instead for 
Did you mean: 

Can't upload files with accented characters

guilherme_souza
Champ in-the-making
Champ in-the-making
Hi, i've created a aspect to type the file, and this value may have accented characters. I've putted a list in the upload form to standardize the types, but they appear like the image below:

[img]http://img842.imageshack.us/img842/3281/accented.png[/img]

The word that should appear at the selected item is: "Acórdão"

It's possible make apperar accented characters in this list?

I think i have to change the default encoding, but how i do that in alfresco?
6 REPLIES 6

mitpatoliya
Star Collaborator
Star Collaborator
Have you configured your database to support the UTF-8 characters?
You need to do that .
Check out this post
https://forums.alfresco.com/en/viewtopic.php?f=45&t=44504&p=130815#p130815

guilherme_souza
Champ in-the-making
Champ in-the-making
I thought about changing the encoding of the database, but when I went to change, I've seen that the encoding was already in utf-8:

[img]http://img15.imageshack.us/img15/9226/encoding.png[/img]

so, what is happening with the list objects ?    Smiley Frustrated

jordiv
Champ on-the-rise
Champ on-the-rise
You could also check that the XML file where you defined your aspect is encoded in UTF-8 as well.


Cheers,
Jordi

jpfi
Champ in-the-making
Champ in-the-making
Hi,
and your java process should be started with UTF-8 encoding (-Dfile.encoding=utf-8)
cheers, jan

guilherme_souza
Champ in-the-making
Champ in-the-making
I've already defined the encode method in the XML file, but i don't know how to define this in the java process. I would be very grateful if someone could explain to me how I should proceed to define this in the java process too.

afaust
Legendary Innovator
Legendary Innovator
In a properly set up server you should not need to specify the file encoding, but to be safe you should append the parameter Jan mentioned to the JVM start parameters (JAVA_OPTS for Tomcat) e.g.


export JAVA_OPTS = %JAVA_OPTS% -Dfile.encoding=UTF-8
[code]

Also, your database seems to be set to a Brazilian-Portugese character set / code page. So even if your database speaks UTF-8 on the connection layer, if the persistence layer has troubles with some characters you will never get a decent result.
It is 2012 - everything should have been UTF-8 by default by now. That means
[*] database character set
[*] database server connection encoding
[*] database client connection encoding (e.g. for MySQL, there is an additional paramter in the JDBC connection string)
[*] file system encoding (or, if that is lacking, the Java file.encoding)
[*] application server request / response content as well as URI encoding