Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / February 2005

Tip: Looking for answers? Try searching our database.

Java (+MySQL)  Umlautproblem

Thread view: 
Markus Müller-Trapet - 25 Feb 2005 12:22 GMT
Hallo ich habe das folgende Problem (ja ich habe schon
danach gesucht, aber nie die richtige Antwort gefunden)

Ich möchte mit einem Java-Applet Texte in eine MySQL
Datenbank schreiben und aus der Datenbank holen (hab ich
über Webhosting, habe also keinen ADMIN Zugriff darauf).

Das Schreiben ist kein Problem, unter phpMySQL Admin wird
auch alles richtig angezeigt,
aber wenn ich das mit nem Applet auslesen will, kommen die
Umlaute als lauter Quatsch raus,
genauso ß. Ich habe mal probiert der getConnection() die
Einstellung charSet=de-iso-8859-1
mitzugeben, bringt aber nix soweit.

Mein Codeteil zum Auslesen sieht so aus (ich speichere das
Ganze in nem JTree):

        String date = rec.getString(2);
                String artist = rec.getString(3);
                String location = rec.getString(4);
                String author = rec.getString(5);

                if (date.compareToIgnoreCase(lastDate) == 0)
                {
                    entryNode =
                        new DefaultMutableTreeNode(artist +
" / " + location + "  dazugeräumt von: " +        
            author);
                    dateNode.add(entryNode);
                }
                else
                {
                    dateNode = new
DefaultMutableTreeNode(date);
                    top.add(dateNode);
                    entryNode =
                        new DefaultMutableTreeNode(artist +
" / " + location + "  dazugeräumt von: " +
            author);
                    dateNode.add(entryNode);
                }
                lastDate = date;

Alle anderen Einstellungen sind auf jeden Fall richtig, es
hat auch schonmal geklappt (übrigens: das "ä" von
"dazugeräumt" wird richtig angezeigt.

Ich wäre sehr dankbar für Tips, habe wenig bis keine Ahnung
von MySQL und Anfängererfahrung von Java.
Tilman Bohn - 25 Feb 2005 13:44 GMT
[...]
> Ich wäre sehr dankbar für Tips, habe wenig bis keine Ahnung
> von MySQL und Anfängererfahrung von Java.

Here's a tip: de.comp.lang.java is over -----> thataway.

;-)

Signature

Cheers, Tilman

`Boy, life takes a long time to live...'      -- Steven Wright

Frances Del Rio - 25 Feb 2005 15:49 GMT
try de.comp.datenbanken.mysql...
viel Gluck!!

Frances

> Hallo ich habe das folgende Problem (ja ich habe schon danach gesucht,
> aber nie die richtige Antwort gefunden)
[quoted text clipped - 45 lines]
> Ich wäre sehr dankbar für Tips, habe wenig bis keine Ahnung von MySQL
> und Anfängererfahrung von Java.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.