GeeCON Prague 2014*
The moose likes JForum and the fly likes Charset Bug: UTF-8 x ISO-8859-1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JForum
Bookmark "Charset Bug: UTF-8 x ISO-8859-1" Watch "Charset Bug: UTF-8 x ISO-8859-1" New topic
Author

Charset Bug: UTF-8 x ISO-8859-1

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi Guys!!!

When we install JForum, by default, it sets at jforum-custom.conf the following parameter:

mail.charset=UTF-8

I was having some problems and changed it to:

mail.charset=ISO-8859-1

Well... I have different problems, but problems yet...

In original \templates\mail\pt_BR\newPrivateMessage.txt, for example, I added a line like the following:

��̩�?�?̼ ̢̨̻̫�� ��̬���?�? ̵̣ �?̤

The UTF-8 charset mail received presents it like follows:

��?��?��?��?��? ��?��?��?��?��? ��?��?��?��?��? ��?��? ��?

Its source code is it:

=EF=BF=BD =EF=BF=BD =EF=BF=BD =EF=BF=BD...


The ISO-8859-1 is like it (even in its source code):

??? ??? ??? ?? ?

:?: Finally the doubt: what should I do to correct it???

[ ]'s
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Unicode that is very hard to handle correctly.

There are a lot of possible problems that you may run on.

Have you saved the .txt file using the target encoding?

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Great Rafael!!!

Before it was saved as ANSI!
Now, as UTF-8, it works fine!!!

The file format options are:
- PC
- UNIX
- Mac

The encoding options are:
- Default
- ANSI
- DOS
- UTF-8
- Unicode
- Unicode (big-endian)

Even on a Linux environment, the double PC + UTF-8 made it works!

TKS a LOT!!!

[ ]'s

:idea: PS: I hadn't changed the encoding before. So, I think that by default JForum's txt files are saved on ANSI... but the email's engine thinks it's UTF-8... just sharing an idea...
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

I have the same problem as leandro_salvador had.
The problem occurs with sending the messages using UTF-8 or ISO-8859-15.
I am running jforum 2.1.7 on a linux machine.

The text files with mail content have been converted to the correct charset.
I have tested the mailing using the mail.charset=UTF-8 and in a different run to ISO-8859-15.

I get garbage, whenever the characters �������? are in the mail content.

Where is the file format set ?

The file format options are:
- PC
- UNIX
- Mac

Is this a property ?


Thanks for your help

Lears_Macaw
[originally posted on jforum.net by Lears_Macaw]
 
GeeCON Prague 2014
 
subject: Charset Bug: UTF-8 x ISO-8859-1