473,387 Members | 3,684 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

inserting utf-8

I have ensured my java program is taking and passing utf-8 into the mysql inserts but I see question marks in the database.

I did a

ALTER DATABASE dbname CHARACTER SET utf8 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT COLLATE utf8_general_ci ;

AND

ALTER TABLE users DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;

But still the UTF character codes are not getting inserted? Anything obvious that I am missing?
May 19 '08 #1
3 3078
ronverdonk
4,258 Expert 4TB
I have ensured my java program is taking and passing utf-8 into the mysql inserts but I see question marks in the database.
What do you use to look at the database? How is that application set up in regard to character sets and encodings?

Ronald
May 20 '08 #2
I have read the documents and manuals but looks like am missing something.

I use phpmyadmin to look at the data.

I take a UTF-8 username in the registration screen and insert into the database. When the user tries to log in by supplying the same username, the characters in the database do not match (I have even seen that their codes are different).
May 20 '08 #3
ronverdonk
4,258 Expert 4TB
Are you using the SET NAMES command of MySQL before you INSERT or UPDATE? Like (in PHP)
Expand|Select|Wrap|Line Numbers
  1. mysql_query("SET NAMES 'UTF8'");
Ronald
May 20 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dthmtlgod | last post by:
I am trying to insert a date into a date field through my website. The date is pre-populated with todays date. I am getting a type mismatch error. The Access DB is setup as a Date/Time Short...
1
by: CB | last post by:
I have a group of documents that previously had no schema, now I have a schema, and I want to use XSLT to fixup the documents by inserting the namespace reference. In other words, my input...
1
by: gabe | last post by:
I am looking for a way to mimic some of the functionality of a web page without writing html (or I am looking to someone to point out something really obvious that I am over looking) Currently I...
2
by: pramod | last post by:
Hi I am facing the problem while inserting the spanish characters in the DB2 UDB v8.2 database. We are pulling the data from SQL server through informatica and then pushing the same in the DB2...
10
by: Roger Withnell | last post by:
I'm using ASP, VBScript and SQL Server. I'm also using UTF-8 character set and so my codepage is 65001 and SQL Server datatype nvarchar. I can insert unicode characters correctly into the...
0
by: marcin | last post by:
I have problems with inserting Japanese chars into MySQL database. This operation results in two completetely different strings that I can see via phpMyAdmin: $word: SELECT word FROM table;...
7
by: Dean | last post by:
This seems like it should be easy but I am stumped. I am trying take a variable, add to it, and insert the result as a new record into Access. The ending result is: INSERT INTO Period...
1
by: shorti | last post by:
Hello, I am running DB2 UDB 8.2 on AIX 5.3. I am running some tests on converting several tables on an existing database to Unicode. The database will not be converted to unicode...just this...
6
by: gita ziabari | last post by:
Hello All, The following code does not work for unicode characters: keyword = dict() kw = 'генских' keyword.setdefault(key, ).append (kw) It works fine for inserting ASCII character. Any...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.