Questions tagged [string-decoding]

96 questions
12
votes
3 answers

Unicode value \uXXXX to Character in Javascript

I've never done this before and am not sure why it's outputting the infamous � encoding character. Any ideas on how to output characters as they should (ASCII+Unicode)? I think \u0041-\u005A should print A-Z in UTF-8, which Firefox is reporting is…
vol7ron
  • 40,809
  • 21
  • 119
  • 172
5
votes
2 answers

How efficient is the encoding/decoding algorithm of BASE64 class in Java?

I am about to use an algorithm to encode a variable length but very long String field retrieved from an XML file, then that encoded data should be persisted in the database. Later, when I recieve a second file I need to fetch the encoded data from…
5
votes
1 answer

Creating TfRecords from a list of strings and feeding a Graph in tensorflow after decoding

The aim was to create a database of TfRecords. Given: I have 23 folders each contain 7500 image, and 23 text file, each with 7500 line describing features for the 7500 images in separate folders. I created the database through this code: import…
I. A
  • 2,252
  • 26
  • 65
4
votes
1 answer

Unhandled Exception: FormatException: Unexpected extension byte (at offset 5)

The Json response has an gzip encoded string. var dataList = [ {"Data": "compressedata"}, {"Data": "compressedData"} ]; I tried so many methods to decompress the string but could not get the expected results. The final way tried was …
Android_id
  • 1,521
  • 1
  • 15
  • 33
4
votes
2 answers

Decode image bytes data stream to JPEG

I am struggling to successfully decode a JPEG image from bytes, back to JPEG again. I started from encoded frame from a MJPG bytes stream, which I want to decode in order to manipulate with OpenCV. I am a bit of a newbie at Python, numpy, opencv…
CodeFlan
  • 105
  • 1
  • 8
4
votes
2 answers

Reading data from _transaction_state topic in Kafka 0.11.0.1

I want to read meta data for transaction (which is supported in Kafka 0.11.0.1) so that I can figure out that whether the transaction for a particular transactional ID has been committed or not. Currently I am getting the key and value from…
4
votes
5 answers

Issue with Encoding base64 in PHP and Decoding base64 in Java

A string-"gACA" encoded in PHP using base64. Now I'm trying to decode in java using base64. But getting absurd value after decoding. I have tried like this: public class DecodeString{ { public static void main(String args[]){ String…
Samraan
  • 204
  • 1
  • 2
  • 14
3
votes
0 answers

How can I determine the encoding used given the plain text string and encoded string?

We are working on exporting a bunch of data from a 3rd party system and bringing it into our own. The only good way to do this is to use the SQL database. We have had a good amount of success finding everything we need to extract, but one particular…
Matt0
  • 89
  • 6
3
votes
1 answer

How do I get audio/video from base64 encoded string?

In JSON file, I am receiving the base64 encoded string. It may contain image file, pdf file, doc or text file or audio/video file. How can I show/play audio/video in iOS from base64 encoded string? I implemented code for images, doc, pdf, text…
Nikita Patil
  • 674
  • 1
  • 7
  • 17
3
votes
2 answers

Configuring JAXB unmarshal tp avoid decoding the XML data

I have an incoming XML with a value which is an encoded form such as <img src=/".../" > , but when unmarshalling this data JAXB is decoding the data to which I do not want it to do. Is there any configuration to disable this…
3
votes
1 answer

How to decode the response returned by powerprofiles.com

Using python2.7.3 IDLE urllib2.urlopen( "http://www.powerprofiles.com/search?keyword=wholesale&location=&ctry=&sls=&yrs=&emps=&sort=").read() It returns me the following response…
Ibrahim
  • 55
  • 1
  • 2
  • 8
2
votes
1 answer

c# 4.0 wpf html decode is not correctly decoding special characters - System.Net.WebUtility.HtmlDecode

The text i am trying to decode Anasayfa > OEM Ürünleri > Ekran Kartları > SAPPHIRE Alright this is how i am trying string srCategory = System.Net.WebUtility.HtmlDecode(nodeCategory.InnerText.ToString()).ToString().Trim(); The result: Anasayfa >…
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
2
votes
1 answer

Base64 encoding/decoding not working with special characters in Java 1.6

I am using JDK 1.6 and facing issue while trying to encoding/decoding French words. My code is under: String setText = "Vos factures impayées Internet sont"; String encodedText=…
Touqeer
  • 87
  • 2
  • 12
2
votes
1 answer

Decoding strings in c#

I have an app that works with some texts and I need to decode strings like: example\x27s string example\u0027s string For the first one I tried using Uri.UnescapeDataString(string.Replace("\\x", "%")) which works but not always because if the…
slemdx
  • 1,055
  • 2
  • 16
  • 19
2
votes
1 answer

String Decoding in Golang

In Ruby, I'm using the string.unpack method to decode some data. I'm migrating this code into a Golang app, however I can't find a corresponding method in the standard library? The ruby code is: str.unpack('>LLLff') What is the best way to…
Ben Toogood
  • 469
  • 4
  • 9
1
2 3 4 5 6 7