![]() |
|
|
|
#1 |
|
Posts: n/a
|
how can i get the default encoding value of a jvm or a system?
- Ki |
|
|
|
#2 |
|
Posts: n/a
|
On Tue, 15 Jul 2003 08:53:06 -0400, "Kihup Boo" <> wrote:
> how can i get the default encoding value of a jvm or a system? System.getProperty("file.encoding"); On my XP system, it yields "Cp1252", on my Linux box it's "UTF-8". Based on your language and region, you will get different values (maybe). --Joe |
|
|
|
#3 |
|
Posts: n/a
|
On Tue, 15 Jul 2003 08:53:06 -0400, "Kihup Boo" <>
wrote or quoted : >how can i get the default encoding value of a jvm or a system? see http://mindprod.com/jgloss/encoding.html hint: it is not DEFAULT !!! -- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary. |
|
|
|
#4 |
|
Posts: n/a
|
>>how can i get the default encoding value of a jvm or a system?
> > see http://mindprod.com/jgloss/encoding.html > hint: it is not DEFAULT !!! This little trick should tell you the JVM-OS default encoding. More transparent implementation would use a os-generated temporary file and then delete it. Most likely utility class with a static value would create a temp file on first method invocation and then reuse that value. I dont know whether we could use FileReader to achieve the same encoding value. private String getDefaultCharSet() throws IOException { FileWriter filewriter = new FileWriter("out"); String encname = filewriter.getEncoding(); filewriter.close(); return encname; } |
|
|
|
#5 |
|
Posts: n/a
|
On Tue, 15 Jul 2003 08:53:06 -0400, "Kihup Boo" <>
wrote or quoted : >how can i get the default encoding value of a jvm or a system? check out Wassup which displays the system properties. Every but he kitchen sink is in there somewhere. http://mindprod.com/wassup.html -- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary. |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DVDSHRINK encoding question | Jørn Jensen | DVD Video | 3 | 12-21-2005 09:49 AM |
| Computer with default language in Chinese | AG | A+ Certification | 3 | 04-03-2005 11:40 PM |
| ProCoder 2 DVD tutorial with Ben Waggoner... | DSL.net News | DVD Video | 1 | 09-17-2004 05:30 AM |
| The story behind DIVX encoding? | Opticreep | DVD Video | 1 | 05-23-2004 02:25 AM |
| Re: Default media player | natural_4u | A+ Certification | 1 | 02-16-2004 08:35 PM |