Search Results

Search found 9564 results on 383 pages for 'character encoding'.

Page 12/383 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • $_GET encoding problem with cyrillic text

    - by T1000
    I'm trying this code (on my local web server) <?php echo 'the word is / ?????? ? '.$_GET['word']; ?> but I get corrupted result when enter ?word=????? the word is / ?????? ? ???? The document is saved as 'UTF-8 without BOM' and headers are also UTF-8. I have tried urlencode() and urldecode() but the effect was same. When upload it on web server, works fine...

    Read the article

  • [Cocoa] NSTask string encoding problem

    - by ryyst
    Hi, In my program, I'm grep-ing via NSTask. For some reason, sometimes I would get no results (even though the code was apparently the same as the command run from the CLI which worked just fine), so I checked through my code and found, in Apple's documentation, that when adding arguments to an NSTask object, "the NSTask object converts both path and the strings in arguments to appropriate C-style strings (using fileSystemRepresentation) before passing them to the task via argv[]" (snip). The problem is that I might grep terms like "Río Gallegos". Sadly (as I checked with fileSystemRepresentation), that undergoes the conversion and turns out to be "RiÃÅo Gallegos". How can I solve this? -- Ry

    Read the article

  • Trouble Percent-Encoding Spaces in Java

    - by behrk2
    Hi Everyone, I am using the URLUTF8Encoder.java class from W3C (www.w3.org/International/URLUTF8Encoder.java). Currently, it will encode any blank spaces ' ' into plus signs '+'. I am having difficulty modifying the code to percent-encode the blank space into '%20'. Unfortunately, I am not too familiar with hex. Can anyone help me out? I need to modify this snippet... else if (ch == ' ') { // space sbuf.append('+'); in the following code: final static String[] hex = { "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", "%20", "%21", "%22", "%23", "%24", "%25", "%26", "%27", "%28", "%29", "%2A", "%2B", "%2C", "%2D", "%2E", "%2F", "%30", "%31", "%32", "%33", "%34", "%35", "%36", "%37", "%38", "%39", "%3A", "%3B", "%3C", "%3D", "%3E", "%3F", "%40", "%41", "%42", "%43", "%44", "%45", "%46", "%47", "%48", "%49", "%4A", "%4B", "%4C", "%4D", "%4E", "%4F", "%50", "%51", "%52", "%53", "%54", "%55", "%56", "%57", "%58", "%59", "%5A", "%5B", "%5C", "%5D", "%5E", "%5F", "%60", "%61", "%62", "%63", "%64", "%65", "%66", "%67", "%68", "%69", "%6A", "%6B", "%6C", "%6D", "%6E", "%6F", "%70", "%71", "%72", "%73", "%74", "%75", "%76", "%77", "%78", "%79", "%7A", "%7B", "%7C", "%7D", "%7E", "%7F", "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF" }; public static String encode(String s) { StringBuffer sbuf = new StringBuffer(); int len = s.length(); for (int i = 0; i < len; i++) { int ch = s.charAt(i); if ('A' <= ch && ch <= 'Z') { // 'A'..'Z' sbuf.append((char) ch); } else if ('a' <= ch && ch <= 'z') { // 'a'..'z' sbuf.append((char) ch); } else if ('0' <= ch && ch <= '9') { // '0'..'9' sbuf.append((char) ch); } else if (ch == ' ') { // space sbuf.append('+'); } else if (ch == '-' || ch == '_' // unreserved || ch == '.' || ch == '!' || ch == '~' || ch == '*' || ch == '\'' || ch == '(' || ch == ')') { sbuf.append((char) ch); } else if (ch <= 0x007f) { // other ASCII sbuf.append(hex[ch]); } else if (ch <= 0x07FF) { // non-ASCII <= 0x7FF sbuf.append(hex[0xc0 | (ch >> 6)]); sbuf.append(hex[0x80 | (ch & 0x3F)]); } else { // 0x7FF < ch <= 0xFFFF sbuf.append(hex[0xe0 | (ch >> 12)]); sbuf.append(hex[0x80 | ((ch >> 6) & 0x3F)]); sbuf.append(hex[0x80 | (ch & 0x3F)]); } } return sbuf.toString(); } Thanks!

    Read the article

  • JDBC character encoding

    - by wheelie
    Hi there, I have a Java Web application using GlassFish 3, JSF2.0 (facelets) and JPA (EclipseLink) on MySQL (URL: jdbc:mysql://localhost:3306/administer). The problem I'm facing is that if I'm saving entities to the database with the update() method, String data loses integrity; '?' is shown instead of some characters. The server, pages and database is/are configured to use UTF-8. After I post form data, the next page shows the data correctly. Furthermore it "seems" in debug that the String property of the current entity stores the correct value too. Dunno if NetBeans debug can be trusted; might be that it decodes correctly, however it's incorrect. Any help would be appreciated, thanks in advance! Daniel

    Read the article

  • JPA character encoding

    - by wheelie
    Hi there, I have a Java Web application using GlassFish 3, JSF2.0 (facelets) and JPA (EclipseLink) on MySQL (URL: jdbc:mysql://localhost:3306/administer). The problem I'm facing is that if I'm saving entities to the database with the update() method, String data loses integrity; '?' is shown instead of some characters. The server, pages and database is/are configured to use UTF-8. After I post form data, the next page shows the data correctly. Furthermore it "seems" in debug that the String property of the current entity stores the correct value too. Dunno if NetBeans debug can be trusted; might be that it decodes correctly, however it's incorrect. Any help would be appreciated, thanks in advance! Daniel

    Read the article

  • ffmpeg libxvid settings for optimal quality and preferably fast encoding

    - by dropson
    What ffmpeg settings should I use to convert a video into xvid with a mixed speed and quality ratio, using 2-passes, and alternativly 1 pass. Currently I use the following for just 1 pass, but I need a better sugestion. -acodec libmp3lame -ab 128 -ar 44100 -ac 2 -vcodec libxvid -qmin 3 -qmax 5 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 2 -maxrate 1300 -b 1200 -threads 0

    Read the article

  • The confusion on python encoding

    - by zhangzhong
    I retrieved the data encoded in big5 from database,and I want to send the data as email of html content, the code is like this: html += """<tr><td>""" html += """unicode(rs[0], 'big5')""" # rs[0] is data encoded in big5 I run the script, but the error raised: UnicodeDecodeError: 'ascii' codec can't decode byte...... However, I tried the code in interactive python command line, there are no errors raised, could you give me the clue?

    Read the article

  • How can I deal with this encoding?

    - by Dan
    Hi all, I'm now trying to parse chrome bookmarks, but I encounter a problem. the bookmarks snippet is presented as follow: { "date_added": "12915566290018721", "id": "16", "name": "hao123\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875", "type": "url", "url": "http://www.hao123.com/" } the string coding corresponding to name field is stored as "hao123\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875", but it should be "hao123--??????" to provide to users. How can I transform "hao123\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875" to "hao123--??????"? thanks!

    Read the article

  • Encoding issue with form and HTML Purifier / MySQL

    - by Andrew Heath
    Driving me nuts... Page with form is encoded as Unicode (UTF-8) via: <meta http-equiv="content-type" content="text/html; charset=utf-8"> entry column in database is text utf8_unicode_ci copying text from a Word document with " in it, like this: “1922.” is insta-fail and ends up in the database as â??1922.â?? (typing new data into the form, including " works fine... it's cut and pasting from Word...) PHP steps behind the scenes are: grab value from POST run through HTML Purifier default settings run through mysql_real_escape_string insert query into dbase Help?

    Read the article

  • Actionscript problems with social share encoding

    - by Rittmeyer
    Hi, I'm trying to make some "social share" buttons at my site, but the urls I generate just don't get decoded by this services. One example, for twitter: private function twitter(e:Event):void { var message:String = "Message with special chars âõáà"; var url:String = "http://www.twitter.com/home?status="; var link:URLRequest = new URLRequest( url + escape(message) ); } But when twitter opens up, the message is: Message with special chars %E2%F5%E1%E0 Something similar is happening with Facebook and Orkut (but these two hide the special chars). Someone know why is this happening?

    Read the article

  • PHP utf encoding problem

    - by shyam
    How can I encode strings on UTF-16BE format in PHP? For "Demo Message!!!" the encoded string should be '00440065006D006F0020004D00650073007300610067006'. Also, I need to encode Arabic characters to this format.

    Read the article

  • Java InputStream encoding/charset

    - by Tobbe
    Running the following (example) code import java.io.*; public class test { public static void main(String[] args) throws Exception { byte[] buf = {-27}; InputStream is = new ByteArrayInputStream(buf); BufferedReader r = new BufferedReader(new InputStreamReader(is, "ISO-8859-1")); String s = r.readLine(); System.out.println("test.java:9 [byte] (char)" + (char)s.getBytes()[0] + " (int)" + (int)s.getBytes()[0]); System.out.println("test.java:10 [char] (char)" + (char)s.charAt(0) + " (int)" + (int)s.charAt(0)); System.out.println("test.java:11 string below"); System.out.println(s); System.out.println("test.java:13 string above"); } } gives me this output test.java:9 [byte] (char)? (int)63 test.java:10 [char] (char)? (int)229 test.java:11 string below ? test.java:13 string above How do I retain the correct byte value (-27) in the line-9 printout? And consequently receive the expected output of the System.out.println(s) command (å).

    Read the article

  • Encoding arbitrary data into numbers?

    - by Pekka
    Is there a common method to encode and decode arbitrary data so the encoded end result consists of numbers only - like base64_encode but without the letters? Fictitious example: $encoded = numbers_encode("Mary had a little lamb"); echo $encoded; // outputs e.g. 122384337422394237423 (fictitious result) $decoded = numbers_decode("122384337422394237423"); echo $decoded; // outputs "Mary had a little lamb"

    Read the article

  • MySQL encoding problem

    - by heffaklump
    I use Java and JDBC to save japanese characters and it works perfectly on my local MySQL. But when I tried doing the same thing on my web hotels MySQL i get ????? instead of japanese characters. I have made the exact same tables and use exact same code. The only difference I have found is SHOW VARIABLES LIKE 'CHAR%' character_set_client utf8 character_set_connection utf8 character_set_database latin1 character_set_filesystem binary character_set_results utf8 character_set_server latin1 character_set_system utf8 character_sets_dir /s/usr-local/share/mysql/charsets/ character_set_datbase is set to latin1. But I can't change it! Any tips?

    Read the article

  • Python and hebrew encoding/decoding error

    - by user340495
    Hey, I have sqlite database which I would like to insert values in Hebrew to I am keep getting the following error : UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128) my code is as following : runsql(u'INSERT into personal values(%(ID)d,%(name)s)' % {'ID':1,'name':fabricate_hebrew_name()}) def fabricate_hebrew_name(): hebrew_names = [u'????',u'???',u'???',u'???',u'????',u'???',u'????',u'???',u'????',u'?????',u'????',u'???',u'????'] return random.sample(names,1)[0].encode('utf-8') note: runsql executing the query on the sqlite database fabricate_hebrew_name() should return a string which could be used in my SQL query. any help is much appreciated.

    Read the article

  • JSP 2.0 SEO friendly links encoding

    - by victor hugo
    Currently I have something like this in my JSP <c:url value="/teams/${contact.id}/${contact.name}" /> The important part of my URL is the ID, I just put the name on it for SEO purposes (just like stackoverflow.com does). I was just wondering if there is a quick and clean way to encode the name (change spaces per +, latin chars removal, etc). I'd like it to be like this: <c:url value="/teams/${contact.id}/${supercool(contact.name)}" /> Is there a function like that out there or should I make my own?

    Read the article

  • Problems with character encoding in ASP.NET MVC

    - by George
    Hello experts! I'm having a weird issue here. I have a bunch of Views, in which I have characters like this: é, á, ó, etc. In one of my Views, I can fetch data from the database with accents just fine, but in another one I simply get the "weird" characters. What can i be doing wrong? Do I need to configure something in order to this work? Thanks!

    Read the article

  • What's the best encoding for videos on the Zune?

    - by Will
    I've got videos I want to encode to put on the zune. Have the encoding software (using Expression Encoder), but I'm not sure about what I should transcode to. I used the settings built into EE for the Zune, but the sync software still shows these videos are being converted before sync. I already have to get these videos into an acceptable format, so encoding twice is a waste of time and space. What I'm looking for is a video codec, audio codec, bitrate, WxH, and anything else I need to encode a video so it goes straight from my disk onto my Zune without re-encoding.

    Read the article

  • [PowerShell] Input encoding

    - by Andy
    Hi! I need to get output of native application under PowerShell. The problem is, output is encoded with UTF-8 (no BOM), which PowerShell does not recognize and just converts those funky UTF chars directly into Unicode. I've found PowerShell has $OutputEncoding variable, but it does not seem to affect input data. Good ol' iconv is of no help either, since this unnecessary UTF8-as-if-ASCII = Unicode conversion takes place before the next pipeline member acquires data.

    Read the article

  • Form character encoding problems with special characters

    - by Enrique
    Hello I have a jsp with an html form. I set the content type like this: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> When I send special characters like á é í ó ú they are saved correctly in the database. My table charset is utf-8. I want to change iso-8859 to utf-8 like this to standardize my application and accept more special characters: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> but when I change it to utf-8 the special characters á é í ó ú are not saved correctly in the databse. When I try to save á it is saved as á In the server side I'm using Spring MVC. I'm getting the text field value like this: String strField = ServletRequestUtils.getStringParameter(request, "field");

    Read the article

  • Encoding with url and api

    - by user2950824
    So I have this web app set up and running and it works fine for any username that you request, but when i try http://mrcastelo.pythonanywhere.com/lol/euw/Nazaré, it simply doesnt work - the error that I get on the server is the following: iddata= getJSON(urllolbase+region+urlid+username) #SummonerID UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128) It is annoying me greatly, I've tried some other threads but none of them came to a fix. The api that I am using (www.legendaryapi.com) does accept this because this works. Any idea on how to fix this?

    Read the article

  • Eclipse Encoding MacRoman -> UTF8

    - by wishi_
    Hi! I recently created a project, organized it and well... I used my Mac with Eclipse running. Somehow it stored everything in MacRoman. The project has to be UTF8. Is there any easy way to handle the conversions?

    Read the article

  • X264 encoding using Opencv

    - by user573193
    I am working with a high resolution camera: 4008x2672. I a writing a simple program which grabs frame from the camera and sends the frame to a avi file. For working with such a high resolution, I found only x264 codec that could do the trick (Suggestions welcome). I am using opencv for most of the image handling stuff. As mentioned in this post http://doom10.org/index.php?topic=1019.0 , I modified the AVCodecContext members as per ffmpeg presets for libx264 (Had to do this to avoid broken ffmpeg defaults settings error). This is output I am getting when I try to run the program [libx264 @ 0x992d040]non-strictly-monotonic PTS 1294846981.526675 1 0 //Timestamp camera_no frame_no 1294846981.621101 1 1 1294846981.715521 1 2 1294846981.809939 1 3 1294846981.904360 1 4 1294846981.998782 1 5 1294846982.093203 1 6 Last message repeated 7 times [avi @ 0x992beb0]st:0 error, non monotone timestamps -614891469123651720 = -614891469123651720 OpenCV Error: Unspecified error (Error while writing video frame) in icv_av_write_frame_FFMPEG, file /home/ajoshi/ext/OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp, line 1034 terminate called after throwing an instance of 'cv::Exception' what(): /home/ajoshi/ext/OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp:1034: error: (-2) Error while writing video frame in function icv_av_write_frame_FFMPEG Aborted Modifications to the AVCodecContext are: if(codec_id == CODEC_ID_H264) { //fprintf(stderr, "Trying to parse a preset file for libx264\n"); //Setting Values manually from medium preset c-me_method = 7; c-qcompress=0.6; c-qmin = 10; c-qmax = 51; c-max_qdiff = 4; c-i_quant_factor=0.71; c-max_b_frames=3; c-b_frame_strategy = 1; c-me_range = 16; c-me_subpel_quality=7; c-coder_type = 1; c-scenechange_threshold=40; c-partitions = X264_PART_I8X8 | X264_PART_I4X4 | X264_PART_P8X8 | X264_PART_B8X8; c-flags = CODEC_FLAG_LOOP_FILTER; c-flags2 = CODEC_FLAG2_BPYRAMID | CODEC_FLAG2_MIXED_REFS | CODEC_FLAG2_WPRED | CODEC_FLAG2_8X8DCT | CODEC_FLAG2_FASTPSKIP; c-keyint_min = 25; c-refs = 3; c-trellis=1; c-directpred = 1; c-weighted_p_pred=2; } I am probably not setting the dts and pts values which I believed ffmpeg should be setting it for me. Any sugggestions welcome. Thanks in advance

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >