Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

store data from client

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am facing a problem which is i have a server class and a client class .in client i have textfield i pass data to server. the text is uni -code
that is bangla.stores fine but when seach the data it cant show bangla.but i need to show the data in bangla.i used mysql.please help me what i have to do?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

You probably have a problem with the character encoding. The first thing you have to do is find out where it goes wrong. Is the data stored in the database correctly? If not, then it is somewhere between submitting the text and storing it in the database. If it is correct in the database, then is it being read correctly from the database? And is it being sent to the client correctly?

Is this a web application, where the text is displayed in a browser? Is the character encoding set correctly in the HTML page?

What does "it can't show bangla" mean exactly - do you get squares or question marks or strange characters on screen, or do you get an error message or does something else happen?

Note that you have to be careful, this kind of problem can be tricky to debug. For example, some tools cannot display foreign language characters correctly, so it could happen that you're looking in the database to see if the text is correct there, but that the tool you're using to look into the database is unable to display the characters.

If you want to know more about character sets and encodings, then this article gives a good overview.
 
Marshal
Posts: 76489
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also . . . what are you displaying it on? A Windows command line has a very restricted range of characters it will display, much less than a Swing component. Try displaying your text on a JOptionPane, for example. Tell us what happens.
 
mostofa monsur
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mostofa monsur wrote:i am facing a problem which is i have a server class and a client class .in client i have textfield i pass data to server. the text is uni -code
that is bangla.stores fine but when search the data it cant show bangla.but i need to show the data in bangla.i used mysql.please help me what i have to do?




thanks for reply.it is a dextop app.Bangla is my mother toung.you are right database show strange characters.when i store data directly in uni-code then it works.but when i send data to database by server from client at that time it stores strange characters.which is not the same as i direct input to database in bangla using uni-code.i send data from client like this --------->
String sd=textfield1.getText();
pw.println(sd);//here pw is object of PrintWriter class

in server i catch the data what i send from client

String df=br.readLine();//here br is the object of BufferReader class
jdbc j=new jdbc();
j.connection();
j.insert("insert into people values('"+df+"')");


this is my code.here the textfield i used which font is also changed.it stores fine but with strange characters .
i use java compiler and mysql database.please help me.
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic