Search Results

Search found 4604 results on 185 pages for 'utf 7'.

Page 18/185 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Python UTF-8 can't decode byte on 32-bit machine

    - by jsh617
    it works fine on 64 bit machines but for some reason will not work on python 2.4.3 on a 32-bit instance. i get the error 'utf8' codec can't decode bytes in position 76-79: invalid data for the code try: str(sourceresult.sourcename).encode('utf8','replace') except: raise Exception( repr(sourceresult.sourcename ) ) it returns 'kazamidori blog\xf9' i have modified my site.py file to make UTF8 the default encoding, but still doesnt seem to be working.

    Read the article

  • What .NET UnmanagedType is Unicode (UTF-16)?

    - by Pat
    I am packing bytes into a struct, and some of them correspond to a Unicode string. The following works fine for an ASCII string: [StructLayout(LayoutKind.Sequential)] private struct PacketBytes { [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string MyString; } I assumed that I could do [StructLayout(LayoutKind.Sequential)] private struct PacketBytes { [MarshalAs(UnmanagedType.LPWStr, SizeConst = 32)] public string MyString; } to make it Unicode, but that didn't work. (Since this field is part of a struct with other fields, which I've omitted for clarity, I can't simply change the CharSet of the containing struct.) Any idea what I'm doing wrong?

    Read the article

  • Localizing a JSF 1.2 application with UTF-8 resources

    - by Filini
    (WARNING: this is my first java application, coming from .NET, so don't bash me if I write too much garbage) I'm developing a simple JSF 1.2 web application which should support Russian, Chinese, and other languages outside ISO 8859-1, which is automatically used in Properties.load(). Is there a way to use the Properties loaded from XML files, with Properties.loadFromXml(), inside JSF, without writing too much code? I know there are alternative ways to do so (writing my own loader, escaping the characters...), but I'd really love to find a simple solution, and I don't see it in all the forums I checked. Thanks in advance for any help

    Read the article

  • sIFR3 and UTF-8 problems

    - by bounce
    Hi, in sIFR3 demo page I put some lithuanian alphabet characters like aceeišuuž and nothing happens. It simply doesn't appear on demo web page. What is the problem ? How to make it encoding friendly ? Your help would be appreciated.

    Read the article

  • Reading php generated XML in flash?

    - by AdonisSMU
    Here is part 1 of our problem (Loading a dynamically generated XML file as PHP in Flash). Now we were able to get Flash to read the XML file, but we can only see the Flash render correctly when tested(test movie) from the actual Flash program. However, when we upload our files online to preview the Flash does not render correctly, missing some vital information(thumbnails, titles, video etc..). Here is a link to the Flash file using a manually created XML file (The Flash renders correctly): http://www.gaban.com/stackoverflow/TEN_xml.html Here is the path to the manually created XML file: http://dev.touchstorm.com/ten_hpn_admin2/client_user2.xml Now here is the link to the Flash file using the PHP generated XML file (Renders incomplete): http://www.gaban.com/stackoverflow/TEN_php.html Path to the PHP generated file (exactly the same as the manually created one): http://dev.touchstorm.com/ten_hpn_admin2/client_user.php?id=2 Additional information: The SWF file exists on Domain 1 The XML & PHP file both exists on Domain 2 And the HTML file with the embed code lies on Domain 3 Wondering if this could be a crossdomain issue? We have one of those files in place on Domain 1 & 2 where we have access too, however for Domain 3 we can't have a crossdomain.xml file there. Here is the PHP code: $xml = new XMLWriter(); $xml->openMemory(); $xml->setIndent(true); $xml->setIndentString("\t"); $xml->startDocument(); $xml->startElement('data'); $xml->startElement('config'); $xml->startElement('hex'); $xml->writeCData('0x' . $widget_profile['background_color']); $xml->endElement(); $xml->startElement('width'); $xml->writeCData($widget_profile['width']); $xml->endElement(); $xml->startElement('height'); $xml->writeCData($widget_profile['height']); $xml->endElement(); $xml->startElement('fullscreen'); $xml->writeCData('false'); $xml->endElement(); $xml->startElement('special'); $xml->writeCData('false'); $xml->endElement(); $xml->startElement('specialName'); $xml->writeCData('Tools & Offers'); $xml->endElement(); $xml->startElement('specialLink'); $xml->writeCData('http://bettycrocker.com'); $xml->endElement(); $xml->startElement('client'); $xml->writeCData($widget_profile['site_url']); $xml->endElement(); $xml->endElement(); if (count($widget_content) > 0) { foreach ($widget_content as $tab) { $xml->startElement('tab'); $xml->writeAttribute('id', $tab['tabname']); if (count($tab['video']) > 0) { foreach ($tab['video'] as $video) { $video_sql = "select VID, flvdoname, title from video where VID='" . $video . "'"; $video_result = $howdini->query($video_sql); if ($video_result->rowCount() > 0) { foreach ($video_result as $video_row) { $video_row['flvdoname'] = substr($video_row['flvdoname'], 35, -4); $xml->startElement('vid'); $xml->writeAttribute('flv', $video_row['flvdoname']); $xml->writeAttribute('thumb', 'http://www.howdini.com/thumb/' . $video_row['VID'] . '.jpg'); $xml->writeAttribute('title', $video_row['title']); $xml->endElement(); } } } } $xml->endElement(); } } $xml->endElement(); $xml->endDocument(); header('Content-Type: text/xml; charset=UTF-8'); echo $xml->flush(); Thanks in advance for any answers! EDIT: I have included the change and now Firebug sees the XML. Now it's just not seeing the swf file but I can see the swf file in other parts of the page.

    Read the article

  • How exactly does a program convert everything to UTF-8 internally?

    - by xyld
    does it use setlocale()? does it assume utf-8 for all input strings when in a UTF-8 locale? I understand what unicode is and how it is related to utf-8, but how does one "convert to it" internally with all their strings? How does it convert all input strings to UTF-8? Does it use a C library function? Does the current working locale have to be a UTF-8 locale? UPDATE: if specific technical details could be in your answer, that would be great as that is more along the lines of what I'm looking for. I already understand the reasons for using UTF-8 internally and why it makes dealing with multiple locales much simpler.

    Read the article

  • How can I get Perl to detect the bad UTF-8 sequences?

    - by gorilla
    I'm running Perl 5.10.0 and Postgres 8.4.3, and strings into a database, which is behind a DBIx::Class. These strings should be in UTF-8, and therefore my database is running in UTF-8. Unfortunatly some of these strings are bad, containing malformed UTF-8, so when I run it I'm getting an exception DBI Exception: DBD::Pg::st execute failed: ERROR: invalid byte sequence for encoding "UTF8": 0xb5 I thought that I could simply ignore the invalid ones, and worry about the malformed UTF-8 later, so using this code, it should flag and ignore the bad titles. if(not utf8::valid($title)){ $title="Invalid UTF-8"; } $data->title($title); $data->update(); However Perl seems to think that the strings are valid, but it still throws the exceptions. How can I get Perl to detect the bad UTF-8?

    Read the article

  • mysql replace accented characters

    - by pixeline
    Hi, i would like to generate strict alphanumeric character logins from users' first and lastname. Since many of them are foreigners, their names have special characters (é, è, ï, ...). I would like to remove the accents (e,e,i,...) in the logins. Here is my query. Is there a character set that does not contain accents? UPDATE contacts SET login=CONVERT(LOWER(CONCAT(firstname,'.',lastname)) USING utf8);

    Read the article

  • Iphone SQLite Databse with german umlauts results in NULL value

    - by Daniel
    Hi guys, I'm quite new to the Iphone development and after search for an answer for 3 hours now, I hope that you guys can give me a hand. My problem is that I have a SQLite Database with german umlauts. Looking at it with a SQLite browser tool shows me that the data is stored with german umlauts, correctly. But selecting fields with german umlauts in it results in a NULL value. I'm already using "stringWithUTF8String", so I don't get the point where the problem is placed. Here is my code: -(void) readSearchFromDatabase { searchFlag = YES; // Setup the database object sqlite3 *database; // Init the SCode Array searchSCodes = [[NSMutableArray alloc] init]; // Open the database from the users filessytem if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { NSString *wildcard =@"%"; // Setup the SQL Statement and compile it NSString *sql = [NSString stringWithFormat:@"SELECT * FROM scode WHERE ta LIKE '%@%@%@' OR descriptionde LIKE '%@%@%@' OR descriptionen LIKE '%@%@%@'", wildcard, searchBar.text, wildcard, wildcard, searchBar.text, wildcard, wildcard, searchBar.text, wildcard, wildcard, searchBar.text, wildcard]; //Creating a const char SQL Statement especially for SQLite const char *sqlStatement = [sql UTF8String]; sqlite3_stmt *compiledStatement; if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) { // Loop through the results and add them to the feeds array while(sqlite3_step(compiledStatement) == SQLITE_ROW) { // Read the data from the result row NSString *aTa = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 0)]; NSString *aReport = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)]; NSString *aDescriptionDE = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)]; NSString *aDescriptionEN = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)]; //Results a NULL value NSLog(@"Output: %@", aDescriptionDE); // Create a new SCode object with the data from the database SCode *searchSCode = [[SCode alloc] initWithTa:aTa report:aReport descriptionDE:aDescriptionDE descriptionEN:aDescriptionEN]; // Add the SCode object to the SCodes Array [searchSCodes addObject:searchSCode]; [searchSCode release]; } } // Release the compiled statement from memory sqlite3_finalize(compiledStatement); } sqlite3_close(database); }

    Read the article

  • Dreaded python encoding errors, how to stop them?

    - by Rhubarb
    These have been plaguing me endlessly. Why? It seems that my console can't handle the encoding. I take it that the my browser and word processor can handle it. I don't have a master list of all the possible characters that it's choking on. What is the best way to relieve this without modifying my data? 'charmap' codec can't encode character u'\xca'

    Read the article

  • ISO-8859-1 to UTF8 in ASP.NET 2

    - by Gordon Carpenter-Thompson
    We've got a page which posts data to our ASP.NET app in ISO-8859-1 <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <title>`Sample Search Invoker`</title> </head> <body> <form name="advancedform" method="post" action="SearchResults.aspx"> <input class="field" name="SearchTextBox" type="text" /> <input class="button" name="search" type="submit" value="Search &gt;" /> </form> and in the code behind (SearchResults.aspx.cs) System.Collections.Specialized.NameValueCollection postedValues = Request.Form; String nextKey; for (int i = 0; i < postedValues.AllKeys.Length; i++) { nextKey = postedValues.AllKeys[i]; if (nextKey.Substring(0, 2) != "__") { // Get basic search text if (nextKey.EndsWith(XAEConstants.CONTROL_SearchTextBox)) { // Get search text value String sSentSearchText = postedValues[i]; System.Text.Encoding iso88591 = System.Text.Encoding.GetEncoding("iso-8859-1"); System.Text.Encoding utf8 = System.Text.Encoding.UTF8; byte[] abInput = iso88591.GetBytes(sSentSearchText); sSentSearchText = utf8.GetString(System.Text.Encoding.Convert(iso88591, utf8, abInput)); this.SearchText = sSentSearchText.Replace('<', ' ').Replace('>',' '); this.PreviousSearchText.Value = this.SearchText; } } } When we pass through Merkblätter it gets pulled out of postedValues[i] as Merkbl?tter The raw string string is Merkbl%ufffdtter Any ideas?

    Read the article

  • PHP: Convert curl_exec output to UTF8

    - by Paul Tarjan
    I would like to only work with UTF8. The problem is I don't know the charset of every webpage. How can I detect it and convert to UTF8? <?php $url = "http://vkontakte.ru"; $ch = curl_init($url); $options = array( CURLOPT_RETURNTRANSFER => true, ); curl_setopt_array($ch, $options); $data = curl_exec($ch); // $data = magic($data); print $data; See this at: http://paulisageek.com/tmp/curl-utf8 What is magic()?

    Read the article

  • Windows C API for UTF8 to 1252

    - by Paul
    I'm familiar with WideCharToMultiByte and MultiByteToWideChar conversions and could use these to do something like: UTF8 - UTF16 - 1252 I know that iconv will do what I need, but does anybody know of any MS libs that will allow this in a single call? I should probably just pull in the iconv library, but am feeling lazy. Thanks

    Read the article

  • How to unescape special characters from BeautifulSoup output?

    - by Suhail
    Hi, I am facing issues with the special characters like ° and ® which represent the degree Fahrenheit sign and the registered sign, when i print the string the contains the special characters, it gives output like this: Preheat oven to 350&deg; F Welcome to Lorem Ipsum Inc&reg; Is there a way I can output the exact characters and not their codes? Please let me know.

    Read the article

  • PHP filter_var() - FILTER_VALIDATE_URL

    - by Alix Axel
    The FILTER_VALIDATE_URL filter seems to have some trouble validating non-ASCII URLs: var_dump(filter_var('http://pt.wikipedia.org/wiki/', FILTER_VALIDATE_URL)); // http://pt.wikipedia.org/wiki/ var_dump(filter_var('http://pt.wikipedia.org/wiki/Guimarães', FILTER_VALIDATE_URL)); // false Why isn't the last URL correctly validated? And what are the possible workarounds? Running PHP 5.3.0. I'd also like to know where I can find the source code of the FILTER_VALIDATE_URL validation filter.

    Read the article

  • How to parse japanese char (utf8?) from imap_fetchbody?

    - by timh
    I am pulling down an email which has english, chinese and japanese in the email. I was using PHP/EZComponents to do this, but a certain japanese char was just not coming through so I am switching to php imap_* funcs to see if they will work. This is what I have below, and the output I am getting. I need to decode this somehow... I know this has been well (read:overly/chaotically) documented all over the web, but I dont have time to earn a PHD in this right now. Any help is greatly appreciated. $hn='{imap.gmail.com:993/imap/ssl}INBOX'; $inbox = imap_open($hn,$username,$password,CL_EXPUNGE); foreach($emails as $email_number) { $ov = imap_fetch_overview($inbox,$email_number,0); $msg = imap_fetchbody($inbox,$email_number,2); var_dump($msg); // doesnt work... .. but right idea? // var_dump( utf8_decode($msg) ); } PARTIAL OUTPUT: <font face=3D"Arial"><span lang=3D"EN-US" style=3D"font-size:10.5pt"><br></= span></font><font color=3D"navy" face=3D"MS Gothic"><span lang=3D"JA" style= =3D"font-size:10.5pt">=CC=EC=9A=DD=A4=AC=A4=A4=A4=A4=A4=AB=A4=E9=A1=A2</spa= n></font></p><p style=3D"margin-right:0pt;margin-bottom:12pt;margin-left:0p= t"> <font color=3D"navy" face=3D"MS Gothic"><span lang=3D"JA" style=3D"font-siz= e:10.5pt"><br></span></font></p><p style=3D"margin-right:0pt;margin-bottom:= 12pt;margin-left:0pt"><font color=3D"navy" face=3D"MS Gothic"><span lang=3D= "JA" style=3D"font-size:10.5pt">xxend</span></font></p>

    Read the article

  • Fixing Unicode Oops

    - by Mez
    It seems that we have managed to insert into our database 2 unicode characters for each of the unicode characters we want, For example, for the unicde char 0x3CBC, we've inserted the unicode equivalents for each of it's components (0xC383 AND 0xC2BC) Can anyone think of a simple solution for fixing this? I've come up with something like SELECT replace(name, CONCAT(0xC3,0x83,0xc2,0xbc), CONCAT(0xc3,0xbc)) FROM lang For the above, but don't want to have to do this for every unicode character!

    Read the article

  • Consuming RSS Feed In PHP

    - by mrduclaw
    I'm trying to use an RSS feed from my blog on the news section on another site. Everything seems to be working fine until I use something like an ellipsis on my blog. The expected output is: One more time…less fail Although this is no joking matter… The actual output is: One more time?less fail Although this is no joking matter… The problem is that ? should be a .... The code I'm using is the same for the first line (the blog title) and the second line (the blog contents) and that code is: $a = utf8_decode($a); print("$a"); Where $a is the string from the RSS feed. Can anyone point in the right direction why that code would work correctly for the body (second line) and not for the title (first line)? Or suggest a better way to do this? Thanks!

    Read the article

  • Get ant concat to ignore BOM's'?

    - by Breck Fresen
    I have an ant build that concatenates my javascript into one file and then compresses it. The problem is that Visual Studio's default encoding attaches a BOM to every file. How do I configure ant to strip out BOM's that would otherwise appear in the middle of the resulting concatenated file? My googl'ing revealed this discussion which is the exact problem I'm having but doesn't provide a solution: http://marc.info/?l=ant-user&m=118598847927096

    Read the article

  • export and import utf8 data in mysql: best practices

    - by ChrisRamakers
    We're often faced with the need to send a data file to one of our clients with data from the database he/she needs to translate. Most of the time this export is CSV or XLS. Most of the time we create a csv dump with phpmyadmin and get an xls file in return with the translated data. The problem is that most of the time the data is UTF8 and when the file is returned as xls each and every time we load the data into mysql again we end up with utf8 problems, characters not being displayed properly, etc ... We've already doublechecked everything in mysql from my.conf to column charactersets and everything is set correctly to UTF8. My question is not how to fix the encoding issue since that's been solved but how we would best proceed in the future handling this situation? What export format should we hand over? How should we import (just mysql load data infile or our own processing scripts). What is the general consensus on how to handle this situation? We would like to continue using excel if possible since that's the format almost everybody expects including our clients' translation agencies. Our clients' ease of use is the most important factor here, without overloading us with major issues each time. The best of both worlds :)

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >