NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Issue with encoding in JAR file/Netbeans environment

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
granadajose



Joined: 02 Jul 2010
Posts: 4

PostPosted: Fri Jul 02, 2010 12:05 pm    Post subject: Issue with encoding in JAR file/Netbeans environment Reply with quote

Hi all,

I am currently developing a tool to check translations into Spanish. I am developing it under Ubuntu, but I also need to use it in Windows.

The tool always works correctly in Ubuntu. However, in Windows, it only works correctly if I launch it using the the Netbeans environment (F6). However, if I build a JAR file and try to launch it doubling click on the JAR file or through the command line, the accented characters (such as "á", "é", "í" or "ú") don't display correctly and the tool doesn't work correctly.

Do you know of any method to make the tool work without having to launch it using Neetbeans?

I have try to build it using different encodings, but none seems to work.

Many thanks for your help,

Jose
Back to top
lsvichet



Joined: 06 Nov 2010
Posts: 1

PostPosted: Sat Nov 06, 2010 8:38 pm    Post subject: Issue with encoding in JAR file/Netbeans environment Reply with quote

I have this problem too
Back to top
granadajose



Joined: 02 Jul 2010
Posts: 4

PostPosted: Sun Nov 07, 2010 4:35 pm    Post subject: Partial solution Reply with quote

I have learn the following about this issue:

1. The issue seems to appear when reading text files. In order to get the same results, the files for Windows and Linux must have different encodings: UTF8 + Linux end lines for Linux and ASCII + Windows end lines for Windows. With this encoding both files will be readed the same way in two operating systems.

2. When writing for a HTML widget (such as a jTextPane), it's best to use the HTML encoding (i.e., "é" for "é", etc.).

Hope this would be useful for you!

Jose
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo