Search Results

Search found 2224 results on 89 pages for 'charset'.

Page 1/89 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Mysql charset problem

    - by Newtonx
    I'm trying to import some data from one server to another. But when I do it, I'm having problems with charset. Words like Goiânia became Goiâni and conceição became conceição My Application was set to use latin1 charset Server 1 : MySQL Charset : UTF-8 Unicode (utf8) table collation : latin1_swedish_ci Server 2 : MySQL Charset: UTF-8 Unicode (utf8) table collation : latin1_swedish_ci Command I used to export data from server 1 mysqldump -u root -p --default-character-set=iso-8859-1 database_name db.sql Command used to restore to server 2 mysql -u root -p database_name < db.sql

    Read the article

  • Java Charset problem on linux

    - by scot
    Hi, problem: I have a string containing special characters which i convert to bytes and vice versa..the conversion works properly on windows but on linux the special character is not converted properly.the default charset on linux is UTF-8 as seen with Charset.defaultCharset.getdisplayName() however if i run on linux with option -Dfile.encoding=ISO-8859-1 it works properly.. how to make it work using the UTF-8 default charset and not setting the -D option in unix environment. edit: i use jdk1.6.13 edit:code snippet works with cs = "ISO-8859-1"; or cs="UTF-8"; on win but not in linux String x = "½"; System.out.println(x); byte[] ba = x.getBytes(Charset.forName(cs)); for (byte b : ba) { System.out.println(b); } String y = new String(ba, Charset.forName(cs)); System.out.println(y); ~regards daed

    Read the article

  • JSF ISO-8859-2 charset

    - by Vladimir
    Hi! I have problem with setting proper charset on my jsf pages. I use MySql db with latin2 (ISO-8859-2 charset) and latin2_croatian_ci collation. But, I have problems with setting values on backing managed bean properties. Page directive on top of my page is: <%@ page language="java" pageEncoding="ISO-8859-2" contentType="text/html; charset=ISO-8859-2" %> In head I included: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2"> And my form tag is: <h:form id="entityDetails" acceptcharset="ISO-8859-2"> I've created and registered Filter in web.xml with following doFilter method implementation: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.setCharacterEncoding("ISO-8859-2"); response.setCharacterEncoding("ISO-8859-2"); chain.doFilter(request, response); } But, i.e. when I set managed bean property through inputText, all special (unicode) characters are replaced with '?' character. I really don't have any other ideas how to set charset to pages to perform well. Any suggestions? Thanks in advance.

    Read the article

  • jQuery set ISO charset to ajax request

    - by mck89
    Hi, i'm using jQuery for sending ajax requests to the server, but i have some problems with the charset. In the ajax function documentation is written that data is always sent in UTF-8 according to the W3C XMLHTTPRequest standard, so i don't think that jQuery allows you to change the request charset (except if you load a script, but that's not my case). So do you know a way to set the ISO-8859-1 charset for the ajax request in jQuery?

    Read the article

  • Facebook charset detection mechanism?

    - by Void
    Today, I have looked into HTML code of facebook.com, and found something like this: <input type="hidden" value="€,´,€,´,?,?,?" name="charset_test"/> It's repeated two times inside the <form>...</form>. Any idea what this code might be useful for - some kind of server-side client charset detection? As far as I know, browser charset is being transmitted in HTTP request anyway (an "Accept-Charset" header).

    Read the article

  • Facelets charset problem

    - by Vladimir
    Hi! In my earlier post there was a problem with JSF charset handling, but also the other part of the problem was MySQL connection parameters for inserting data into db. The problem was solved. But, I migrated the same application from JSP to facelets and the same problem happened again. Characters from input fields are replaced when inserting to database (c is replaced with Ä), but data inserted into db from sql scripts with proper charset are displayed correctly. I'm still using registered filter and page templates are used with head meta tag as following: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2"> If I insert into h:form tag the following attribute: acceptcharset="iso-8859-2" I get correct characters in Firefox, but not in IE7. Is there anything else I should do to make it work? Thanks in advance.

    Read the article

  • How define charset for HTMLhelp?

    - by Oleg Svechkarenko
    My C++ windows program uses htmlhelp. Structure HH_POPUP includes field pszFont in format: "Facename[, point size[, CHARSET[, color[, PLAIN BOLD ITALIC UNDERLINE]]]]", but I cannot find any info about way to define the charset. My russian popup help is totally unreadeable. HH_POPUP popupAttr; memset(&popupAttr, 0, sizeof(popupAttr)); popupAttr.cbStruct = sizeof(popupAttr); popupAttr.clrBackground = COLORREF(-1); popupAttr.clrForeground = COLORREF(-1); popupAttr.rcMargins.left = -1; popupAttr.rcMargins.bottom = -1; popupAttr.rcMargins.right = -1; popupAttr.idString = UINT(helpInfo->dwContextId); popupAttr.pt = helpInfo->MousePos; popupAttr.pszFont = _T("Arial,18,HOW_TO_DEFINE_THIS_CHARSET"); // please!!! CWnd::GetDesktopWindow()->HtmlHelp(reinterpret_cast<DWORD>(&popupAttr), HH_DISPLAY_TEXT_POPUP);

    Read the article

  • UTF8 charset, diacritical elements, conversion problems - and Zend Framework form escaping

    - by imanc
    Hey, I am writing a webapp in ZF and am having serious issues with UTF8. It's using multi lingual content through Zend Form and it seems that ZF heavily escapes all of these characters and basically just won't show a field if there's diacritical elements 'é' and if I use the HTML entity equivalent e.g. é it gets escaped so that the user will see 'é'. Zend Form allows for having non escaped data, but trying to use this is confusing, and it seems it'd need to be used all over the place. So, I have been told that if the page and the text is in UTF8, no conversion to htmlentities is required. Is this true? And if the last question is true, then how do I convert the source text to UTF8? I am comfortable setting up apache so that it sends a default UTF8 charset heading, and also adding the charset meta tag to the html, but doing this I am still getting messed up encoding. I have also tried opening the translation csv file in TextWrangler on OSX as UTF8, but it has done nothing. Thanks! L

    Read the article

  • Convert charset name to NSStringEncoding

    - by d11wtq
    Given a charset string, such as "utf-8", "iso-8859-1", "us-ascii" etc, is there any built-in way to get the appropriate NSStringEncoding in Cocoa? Right now I'm looking at just building a NSDictionary containing a canonicalized version of the name mapped to the NSStringEncoding, then having a lookup mechanism that canonicalizes the input in the same way. But is there really no way to get NSUTF8StringEncoding given the string "UTF-8", etc?

    Read the article

  • Valid Charset for CSS

    - by Alix Axel
    Quick question: what is the (full) valid / allowed charset for id and class CSS identifiers? Is there a regular expression that I can use to validate against? Is it browser agnostic?

    Read the article

  • charset problem?

    - by Ben Fransen
    Hi all, I have a bugging problem. For a website I made there are search engine friendly URL's generated. The only problem is there are ß-chars in the url too. Chars like ö, ï, ä, ü etc. are placed correct. But with the ß-char there is a diamond-icon with a questionmark in it. I thought it had to do with the charset which is used but i've tried both UTF-8 and iso-8859-1. Both without luck. I need to have the correct character in the url for the readability of deeplinks. Hope to hear from you!

    Read the article

  • charset problem?

    - by Ben Fransen
    Hi all, I have a bugging problem. For a website I made there are search engine friendly URL's generated. The only problem is there are ß-chars in the url too. Chars like ö, ï, ä, ü etc. are placed correct. But with the ß-char there is a diamond-icon with a questionmark in it. - ? I thought it had to do with the charset which is used but i've tried both UTF-8 and iso-8859-1. Both without luck. I need to have the correct character in the url for the readability of deeplinks. Hope to hear from you!

    Read the article

  • Convert charset in mysql query

    - by Yousf
    Hi, I have a question about converting charset from inside mysql query. I have a 2 databases. One for the website (joomla), the other for forum (IPB). I am doing query from inside joomla, which by default have "SET NAMES UTF8". I want to query a table inside the forum databases. A table called "ibf_topics". This table has latin1 encoding. I do the following to select anything from the not-utf8 table. //convert connection to handle latin1. $query = "SET NAMES latin1"; $db->setQuery($query); $db->query(); $query = "select id, title from other_database.ibf_topics"; $db->setQuery($query); $db->query(); //read result into an array. //return connection to handle UTF8. $query = "SET NAMES UTF8"; $db->setQuery($query); $db->query(); After that, when I want to use the selected tile, I use the following: echo iconv("CP1256", "UTF-8", $topic['title']) The question is, is there anyway to avoid all this hassle? For now, I can't change forum database to UTF8 and I can't change joomla database to latin1 :S

    Read the article

  • Set default MySQL connect charset for PHP (in RHEL)?

    - by Martijn Heemels
    We're running a hundred or so legacy PHP websites on an older server which runs Gentoo Linux. When these sites were built latin1 was still the common charset, both in PHP and MySQL. To make sure those older sites used latin1 by default, while still allowing newer sites to use utf8 (our current standard), we set the default connect charset in php.ini: mysql.connect_charset = latin1 mysqli.connect_charset = latin1 pdo_mysql.connect_charset = latin1 Specific more modern sites could override this in their bootstrapping code with: <?php mysql_set_charset("utf8", $dsn ); ...and all was well. Now the server is overloaded and we're no longer with that hoster, so we're moving all these sites to a faster server at our standard hoster, which uses RHEL 5 as their OS of choice. In setting up this new server I discover to my surprise that the *.connect_charset directives are a Gentoo specific patch to PHP, and RHEL's version of PHP doesn't recognize them! Now how do I set PHP to connect to MySQL with the latin1 charset? I thought about setting a default in my.cnf but would prefer not to force every app and client to default to latin1. Our policy is to use utf8, and we'd like to restrict the exception to PHP only. Also, converting every legacy site to properly use utf8 is not doable since many are of the touch 'm and you break 'm kind. We simply don't have the time to go fix them all. How would I set a default mysql/mysqli/pdo_mysql connection charset to latin1 for PHP, while still allowing individual scripts to override this to utf8 with mysql_set_charset()?

    Read the article

  • How to retrieve a IMAP body with the right charset?

    - by Erik
    Hi Guys, I'm trying to make an "IMAP fetch" command to retrieve the message body. I need to pass/use the correct charset, otherwise the response will come with special characters. How can I make the IMAP request/command to consider the charset I received in the BODYSTRUCTURE result??

    Read the article

  • UTF-8 MySQL and Charset, pls help me understand this once and for all!

    - by FFish
    Can someone explain me when I set everything to UTF-8 I keep getting those damn ??? MySQL Server version: 5.1.44 MySQL charset: UTF-8 Unicode (utf8) I create a new database name: utf8test collation: utf8_general_ci MySQL connection collation: utf8_general_ci My SQL looks like this: SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE TABLE IF NOT EXISTS `test_table` ( `test_id` int(11) NOT NULL, `test_text` text NOT NULL, PRIMARY KEY (`test_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `test_table` (`test_id`, `test_text`) VALUES (1, 'hééélo'), (2, 'wööörld'); My PHP / HTML: <?php $db_conn = mysql_connect("localhost", "root", "") or die("Can't connect to db"); mysql_select_db("utf8test", $db_conn) or die("Can't select db"); // $result = mysql_query("set names 'utf8'"); // this works... why?? $query = "SELECT * FROM test_table"; $result = mysql_query($query); $output = ""; while($row = mysql_fetch_assoc($result)) { $output .= "id: " . $row['test_id'] . " - text: " . $row['test_text'] . "<br />"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="it" xmlns="http://www.w3.org/1999/xhtml" xml:lang="it"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>UTF-8 test</title> </head> <body> <?php echo $output; ?> </body> </html>

    Read the article

  • How to make Horde connect to mysql with UTF-8 character set?

    - by jkj
    How to tell horde 3.3.11 to use UTF-8 for it's mysql connection? The $conf['sql']['charset'] only tells horde what is expected from the database. Horde uses MDB2 to connect to mysql. Is there way to force MDB2 or mysql character_set_client from php.ini? So far I found two workarounds: Force mysql to ignore character set requested by client [mysqld] skip-character-set-client-handshake=1 default-character-set=utf8 Force mysql to run SET NAMES utf8 on every connection [mysqld] init-connect='SET NAMES utf8' Both have drawbacks on multi user mysql server. The first disables converting character sets alltogether and the second one forces every connection to produce UTF-8. [EDIT] Found the problem. The 'charset' parameter was unset the last minute before sending to SQL backend. This is probably due to mysql not being able to digest utf-8 but utf8. Mysql specific mapping is required to make it work. I just worked around it by translating utf-8 - utf8. Won't work with any other databases with this patch though. --- lib/Horde/Share/sql.php.orig 2011-07-04 17:09:33.349334890 +0300 +++ lib/Horde/Share/sql.php 2011-07-04 17:11:06.238636462 +0300 @@ -753,7 +753,13 @@ /* Connect to the sql server using the supplied parameters. */ require_once 'MDB2.php'; $params = $this->_params; - unset($params['charset']); + + if ($params['charset'] == 'utf-8') { + $params['charset'] = 'utf8'; + } else { + unset($params['charset']); + } + $this->_write_db = &MDB2::factory($params); if (is_a($this->_write_db, 'PEAR_Error')) { Horde::fatal($this->_write_db, __FILE__, __LINE__); @@ -792,7 +798,13 @@ /* Check if we need to set up the read DB connection seperately. */ if (!empty($this->_params['splitread'])) { $params = array_merge($params, $this->_params['read']); - unset($params['charset']); + + if ($params['charset'] == 'utf-8') { + $params['charset'] = 'utf8'; + } else { + unset($params['charset']); + } + $this->_db = &MDB2::singleton($params); if (is_a($this->_db, 'PEAR_Error')) { Horde::fatal($this->_db, __FILE__, __LINE__);

    Read the article

  • MODx character encoding

    - by Piet
    Ahhh character encodings. Don’t you just love them? Having character issues in MODx? Then probably the MODx manager character encoding, the character encoding of the site itself, your database’s character encoding, or the encoding MODx/php uses to talk to MySQL isn’t correct. The Website Encoding Your MODx site’s character encoding can be configured in the manager under Tools/Configuration/Site/Character encoding. This is the encoding your website’s visitors will get. The Manager’s Encoding The manager’s encoding can be changed by setting $modx_manager_charset at manager/includes/lang/<language>.inc.php like this (for example): $modx_manager_charset = 'iso-8859-1'; To find out what language you’re using (and thus was file you need to change), check Tools/Configuration/Site/Language (1 line above the character encoding setting). This needs to be the same encoding as your site. You can’t have your manager in utf8 and your site in iso-8859-1. Your Database’s Encoding The charset MODx/php uses to talk to your database can be set by changing $database_connection_charset in manager/includes/config.inc.php. This needs to be the same as your database’s charset. Make sure you use the correct corresponding charset, for iso-8859-1 you need to use ‘latin1′. Utf8 is just utf8. Example: $database_connection_charset = 'latin1'; Now, if you check Reports/System info, the ‘Database Charset’ might say something else. This is because the mysql variable ‘character_set_database’ is displayed here, which contains the character set used by the default database and not the one for the current database/connection. However, if you’d change this to display ‘character_set_connection’, it could still say something else because the ’set character set’ statement used by MODx doesn’t change this value either. The ’set names’ statement does, but since it turns out my MODx install works now as expected I’ll just leave it at this before I get a headache. If I saved you a potential headache or you think I’m totally wrong or overlooked something, let me know in the comments. btw: I want to be able to use a real editor with MODx. Somehow.

    Read the article

  • How can I find out what the current charset is in C++?

    - by Stef
    How can I find out what the current charset is in C++? In a console application (WinXP) I am getting negative values for some characters (like äöüé) with (int)mystring[a] and this surprises me. I was expecting the values to be between 127 and 256. So is there something like GetCharset() or SetCharset() in c++?

    Read the article

  • Alter charset and collation in all columns in all tables in MySQL

    - by The Disintegrator
    I need to execute these statements in all tables for all columns. alter table table_name charset=utf8; alter table table_name alter column column_name charset=utf8; Is it possible to automate this in any way inside MySQL? I would prefer to avoid mysqldump Update: Richard Bronosky showed me the way :-) The query I needed to execute in every table: alter table DBname.DBfield CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; Crazy query to generate all other queries: SELECT distinct CONCAT( 'alter table ', TABLE_SCHEMA, '.', TABLE_NAME, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' ) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'DBname'; I only wanted to execute it in one database. It was taking too long to execute all in one pass. It turned out that it was generating one query per field per table. And only one query per table was necessary (distinct to the rescue). Getting the output on a file was how I realized it. How to generate the output to a file: mysql -B -N --user=user --password=secret -e "SELECT distinct CONCAT( 'alter table ', TABLE_SCHEMA, '.', TABLE_NAME, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' ) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'DBname';" > alter.sql And finally to execute all the queries: mysql --user=user --password=secret < alter.sql Thanks Richard. You're the man!

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >