Search Results

Search found 758 results on 31 pages for 'decode'.

Page 21/31 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • How to remove htmlentities() values from the database?

    - by Chris
    Long before I knew anything - not that I know much even now - I desgined a web app in php which inserted data in my mysql database after running the values through htmlentities(). I eventually came to my senses and removed this step and stuck it in the output rather than input and went on my merry way. However I've since had to revisit some of this old data and unfortunately I have an issue, when it's displayed on the screen I'm getting values displayed which are effectively htmlentitied twice. So, is there a mysql or phpmyadmin way of changing all the older, affected rows back into their relevant characters or will I have to write a script to read each row, decode and update all 17 million rows in 12 tables?

    Read the article

  • Ajax / GroovyGrails Post data coming over with unexpected leading character. Who is encoding/decod

    - by ?????
    I'm having an encoding issue, and I'm not sure where to look for the problem. I have this Ajax.Request function (prototype library) sending data to a Groovy/Grails encoder var myAjax = new Ajax.Request(url, {method:'post', encoding:'UTF-8', contentType:'application/x-www-form-urlencoded', parameters:{'content':new_content}, onSuccess:success, onFailure:failure}); The data is coming in with an unexpected %A0 at the beginning: I have this simple controller that just echos the content back: def titlechange = { def content = URLDecoder.decode(params['content']) printf("Content: %s; DecodedContent = %s\n", params['content'], content) response.characterEncoding='UTF-8' render content } the debug print statement shows: Content: %A0Hello%2C%20world%21; DecodedContent = †Hello, world! Where is that %A0 coming from? My grails configuration has this: // The default codec used to encode data with ${} grails.views.default.codec="none" // none, html, base64 grails.views.gsp.encoding="UTF-8" grails.converters.encoding="UTF-8 Is the issue on the grails side or on the JavaScript side?

    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

  • How to get Host OS (operating system) parameter of ZIP archive in C#

    - by bao
    Look. I have ZIP archives prepared in different os'es: mac, linux, windows. In windows file names encoded in DOS CP866, mac & linux in UTF-8. I need to know (in code) in which os zip file was prepared to decode file names correctly. There is a Host OS paramterer in "Central directory structure" of zip file (look http://www.fileformat.info/format/zip/corion.htm ). How to get 0005h 1 byte Host OS parameter in C#?

    Read the article

  • What is the easiest way to send a Javascript array via JSON to PHP?

    - by dscher
    I have a few arrays that I want to send to process with PHP. Using json2.js I will stringify the arrays like so: var JSONlinks = JSON.stringify(link_array); var JSONnotes = JSON.stringify(note_array); but then I'm confused. Do I need to use a XMLHttpRequest object? Is there another way? If that is the simplest way, could someone please just share the most basic instance of the code needed in order to send to PHP where I can then use JSON decode? I think it might help others in the future really. I'm currently using Jquery and I know there are many options out there for frameworks and each one may or may not make this process any easier. If you're using a framework in your reply please mention why you'd choose that framework rather than just javascript.

    Read the article

  • Can I turn off implicit Python unicode conversions to find my mixed-strings bugs?

    - by Tal Weiss
    When profiling our code I was surprised to find millions of calls to C:\Python26\lib\encodings\utf_8.py:15(decode) I started debugging and found that across our code base there are many small bugs, usually comparing a string to a unicode or adding a sting and a unicode. Python graciously decodes the strings and performs the following operations in unicode. How kind. But expensive! I am fluent in unicode, having read Joel Spolsky and Dive Into Python... I try to keep our code internals in unicode only. My question - can I turn off this pythonic nice-guy behavior? At least until I find all these bugs and fix them (usually by adding a u'u')? Some of them are extremely hard to find (a variable that is sometimes a string...). Python 2.6.5 (and I can't switch to 3.x).

    Read the article

  • Strip text of all formatting on paste

    - by griegs
    I have an application that allows the user to create an article. The problem arises when the user pastes from something like Word which comes loaded with a bunch of markup. I'm using a jQuery editor called tiny_mce which allows the markup. I do a htmlencode and decode obviously but it means that i carry a huge payload of markup. Is there a way to strip (all) markup from pasted text and just keep the text? Or is there a way that tiny_mce can show the markup as text?

    Read the article

  • Python - Finding unicode/ascii problems

    - by user330739
    Hi all, I am csv.reader to pull in info from a very long sheet. I am doing work on that data set and then I am using the xlwt package to give me a workable excel file. However, I get this error: UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 34: ordinal not in range(128) My question to you all is, how can I find exactly where that error is in my data set? Also, is there some code that I can write which will look through my data set and find out where the issues lie (because some data sets run without the above error and others have problems)?

    Read the article

  • Cannot load PNG in C# on Mac OSX running Mono

    - by milkplus
    In C#, I'm trying to load a png file on Mac OSX using the latest Mono using System.Drawing; Bitmap bmp = new Bitmap("test.png"); I get the following error Either the image format is unknown or you don't have the required libraries to decode this format [GDI+ status: UnknownImageFormat] It doesn't happen with all png files; just this one. Resaving in photo shop doesn't fix it unless I switch to 8bpp. Is there something I need to install to support this "special" png file? Works fine on windows.

    Read the article

  • String Functions in IIS Url Rewritting Module

    - by Nariman
    The IIS URL Rewrite Module ships with 3 built-in functions: * ToLower - returns the input string converted to lower case. * UrlEncode - returns the input string converted to URL-encoded format. This function can be used if the substitution URL in rewrite rule contains special characters (for example non-ASCII or URI-unsafe characters). * UrlDecode - decodes the URL-encoded input string. This function can be used to decode a condition input before matching it against a pattern. The functions can be invoked by using the following syntax: {function_name:any_string} The question is: can this list be extended by introducing a Replace function that's available for changing values within a rewrite rule action or condition?

    Read the article

  • How to hide keys in application?

    - by WilliamKF
    I have a C++ client/server application where the client and server are my executable. Each time a connection is made between the client and server, I generate a new encryption key for that session and I wish to transmit this session key and encrypt this session key using a static key that is built into both the client and server. However, running strings on my executable reveals the static key. How can I hide the embedded static key in my client and server application so that they are not easily extracted and thus allowing someone to decode my session key.

    Read the article

  • String Functions in IIS Url Rewrite Module

    - by Nariman
    The IIS URL Rewrite Module ships with 3 built-in functions: * ToLower - returns the input string converted to lower case. * UrlEncode - returns the input string converted to URL-encoded format. This function can be used if the substitution URL in rewrite rule contains special characters (for example non-ASCII or URI-unsafe characters). * UrlDecode - decodes the URL-encoded input string. This function can be used to decode a condition input before matching it against a pattern. The functions can be invoked by using the following syntax: {function_name:any_string} The question is: can this list be extended by introducing a Replace function that's available for changing values within a rewrite rule action or condition? Another way to frame the question: is there any way to do a global replace on a URL coming in using this module? It seems that you're limited to using regular expressions and back-references to construct strings, without a search/replace functionality to replace every X with Y in {REQUEST_URI} before issuing a redirect.

    Read the article

  • Submtting data using $.ajax and retrieving values from $_POST array

    - by Linda Keating
    I'm having trouble retrieving my form Data that has been submitted via ajax like this: $( "form" ).on( "submit", function( event ) { var formData = $(this).serializeArray(); console.log("fomData"); $.ajax({ url: window.location.origin+ "/selfservicemanager/localtmfsetup/local_tmf_setup.php", type: "POST", data: JSON.stringify(formData), success : function (){ alert("success"); } }); }); I can see the data being sent over the network like this: But when I try to retrieve the data on the server side the $_POST array is empty. <?php var_dump($_POST); die(); ?> array (size=0) empty Any ideas? I've tried to stringify the data being sent, and also tried to decode the $_POST array but it expects a string.....

    Read the article

  • Characters with jquery json

    - by Mikk
    Hi everyone, I'm using jquery $.getJSON to retrieve list of cities. Everything works fine, but I'm from Estonia (probably most of you don't know much about this country =D) and we are using some characters like õ, ü. ä, ö. When I pass letters like this to callback function, I keep getting empty strings. I've tried to base64 encode(server-side)-decode(jquery base64 plugin) strings (i thought it was a good idea as long as I can compress pages with php, so I don't have to worry about bandwidth), but in this way I end up with some random chinese symbols. What would be the best workaround for this problem. Thank you.

    Read the article

  • relace double quotes to parse JSON in PHP

    - by hunt
    hi, i have following json format { "status": "ACTIVE", "result": false, "isworking": false, "margin": 1, "employee": { "111": { "val1": 5.7000000000000002, "val2": "9/2", "val3": 5.7000000000000002 }, "222": { "val1": 31.550000000000001, "val2": "29/1", "val3": 31.550000000000001 } } } how the problem is when i am trying to decode above json response in php using json_decode($res,true) { true param for associative array } i am getting following result as few fields like "result":false is not "result":"false" i.e. at many of the places doubles quotes are missing in values of json. see in val1 and val3 fields resultant data after decoding in php (associative array) Array ( [status] = ACTIVE [result] = [isworking] = [margin] = 1 [employee] = Array ( [111] = Array ( [val1] = 5.7 [val2] = 9/2 [val3] = 5.7 ) [222] = Array ( [val1] = 31.55 [val2] = 29/1 [val3] = 31.55 ) ) ) please help me on how would i insert double quotes in values ? Thanks

    Read the article

  • Charaters with jquery json

    - by Mikk
    Hi everyone, I'm using jquery $.getJSON to retrieve list of cities. Everything works fine, but I'm from Estonia (probably most of you don't know much about this country =D) and we are using some characters like õ, ü. ä, ö. When I pass letters like this to callback function, I keep getting empty strings. I've tried to base64 encode(server-side)-decode(jquery base64 plugin) strings (i thought it was a good idea as long as I can compress pages with php, so I don't have to worry about bandwidth), but in this way I end up with some random chinese symbols. What would be the best workaround for this problem. Thank you.

    Read the article

  • python input UnicodeDecodeError:

    - by The man on the Clapham omnibus
    python 3.x >>> a = input() hope >>> a 'hope' >>> b = input() håpe >>> b 'håpe' >>> c = input() start typing hå... delete using backspace... and change to hope Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 1: invalid continuation byte >>> The situation is not terrible, I am working around it, but find it strange that when deleting, the bytes get messed up. Has anyone else experienced this? the terminal history shows that I thought that I entered h?ope any ideas? in the script that is using this, I do import readline to give command line history.

    Read the article

  • PAC with kerberoes

    - by Varun
    I am currently working on kerberoes, and for now have this doubt on PAC in MS-KILE kerberoes extension. Can pac included in pactype strcuture withtin authorization data, is meant for client to decrypt and decode. It seems (if my understanding is correct), that PAC is encrypted with target server's encryption key, which is known only to kdc and target server, and therefore, client just needs to forward that to server when requesting a service, and isn't suppose to decrypt and extract details about its credentails. Is there a way to try to decrypt this on the fly? ( is there sufficient information available in AS-REP for me extract and decrypt this?

    Read the article

  • PHP MySQL New Lines / Whitespaces from textarea

    - by rob_robsen
    I've a problem about whitespaces and new lines at the beginning of a textarea. I send a json string with ajax to the php script. Then I decode the string into an php array (with json_decode). So I have a string in this array with two line breaks at the beginning. If a print the text from the array, the line breaks are there, but if I store the text into the mysql database, the line breaks are gone... Only at the beginning of the string, the line breaks gone... At the rest of the string, the line breaks are ok. Thanks for your answers! rob

    Read the article

  • Protect my PHP App

    - by Abs
    Hello all, I have developed an app and its written in PHP (with a bunch of SQL scripts), this app will be used by a few small companies. For them to use it, I will have to install Apache and SQL Server for them. Every method I have thought has fallen short of what I need. I was actually just hoping to use ZendGuard or IonCube but they don't support PHP 5.3.x. Is there a simpler method where I can maybe store a key in the database and make the app run only when it knows its on that server? Maybe create a key based on some random numbers/letters and the machine name, sql server host name and encode/decode this when ever the system is in use? Thanks all for any help or ideas

    Read the article

  • Play mp3 stream from http URL on Windows Mobile 6.0

    - by Thyphuong
    After a short period of time learning about how to play a mp3 http url on windows mobile 6.0, I found that very less dll support that (until now, I just found out Bass.dll work nice). So I intend to change to another way to approach the goal. Here's my idea: Get a stream from http url. Decode the mp3 stream. Play the result from step 2. Coz I'm new on this field, so feel free and explain to me what I'm wrong and/or show me the way.

    Read the article

  • An MP3 parser to extract numbered frames?

    - by Xepoch
    I am writing a streaming application for MP3 (CBR). It is all passthru, meaning I don't have to decode/encode, I just need to pass on the data as I see it come through. I want to be able to count the MP3 frames as they passthru (and some other stuff like throughput calculations). According to the MP3 frame header spec, the sync word appears to be 11 bits of 1s, however I notice (naturally) that the frame payload which I should safely assume to be binary and thus it is not odd at all to see 11 1s in sequence. My questions: Is there a Unix/Linux MP3 parser utility (dd-style) that can pull numbered frames from an MP3 file/pipe? Any perl wisdom here? How does one delineate an MP3 header block from any other binary payload data? and lastly: Is a constant bitrate (CBR) MP3 defined by payload bytes or are the header bytes included in the aggregate # of bytes/bits per any given timeslice? Thanks,

    Read the article

  • How to persist and load an object which conforms to NSCoding protocol?

    - by mystify
    I have made an class which conforms to the NSCoding protocol and does all the encode and decode stuff. For my app, I simply want to persist an object from that class to the device and the next time when the app launches, I want to load that object back into memory. Basically it's just an class which holds some user input information. For example the user starts writing a text but then quits the app. Next time I want to load that data object. I guess I need NSKeyedArchiver? Is there a good tutorial on this? How do I do that?

    Read the article

  • how to play an encrypted file in Android.

    - by user306517
    I need to be able to play an encrypted file in Android. The file is AAC. The only way I can see to do this is either: decrypt the file to internal private storage and point the player at that file to play, or decrypt & decode the file to pcm and feed it to an AudioTrack. 1 isn't great because it takes a long time to do that. 2 isn't great either because I don't know how I can take advantage of the HW decoder to do this. Any ideas? tia.

    Read the article

  • How do I write raw binary data in Python?

    - by Chris B.
    I've got a Python program that stores and writes data to a file. The data is raw binary data, stored internally as str. I'm writing it out through a utf-8 codec. However, I get UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 25: character maps to <undefined> in the cp1252.py file. This looks to me like Python is trying to interpret the data using the default code page. But it doesn't have a default code page. That's why I'm using str, not unicode. I guess my questions are: How do I represent raw binary data in memory, in Python? When I'm writing raw binary data out through a codec, how do I encode/unencode it?

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >