...

View Full Version : linux characters



BubikolRamios
10-11-2009, 06:53 PM
Have app, that worked on windows OK , mysql database ported to linux 5.1.31 --> 5.1.39
on win worked ok, saved ‘čšž’ comed out as ‘čšž’, now it comes out as --> čšž

looks the same (čšž) in mysql query browser on linux



CREATE TABLE `test`.`tab_name` (
...
`col_name` varchar(400) COLLATE utf8_slovenian_ci DEFAULT NULL COMMENT,
..
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci



‘čšž’ gets coruppted only via user input, what I manualy typed into datbase is OK.

Thanks for tips.

BubikolRamios
10-12-2009, 02:20 AM
if I go with this , before saving to database:

java code:


p3 = p3.replace("ž", "ž");
p3 = p3.replace("Ž", "Ž");


p3 = p3.replace("č", "č");
p3 = p3.replace("Œ", "Č");


p3 = p3.replace("š", "š");
p3 = p3.replace(" ", "Š");


then its ok, but this is not the way to do it I presume.

bazz
10-12-2009, 02:56 AM
I'm guessing here but, is your webpage charset the same as your db? maybe it needs to be to avoid that difficulty?

bazz

BubikolRamios
10-12-2009, 08:34 AM
It is. As I said, the same thing works ok windows.

in my.cnf-->



default-collation=utf8_slovenian_ci
default-character-set=utf8


on page-->



<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>


...
<head>
...
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css; charset=utf-8" />
...


it gets wrong somewhere in the way from client to server, independant from database, as it looks like.

mybe there is something like dos chcp on linux, that it matters here ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum