Questions tagged [shift-jis]

Shift JIS is a character encoding for the Japanese language

108 questions
2
votes
1 answer

JS backslash escape char being converted to non-escaping character by Shift JIS

I'm currently working on a website that has two versions, one American website that's served as utf-8 and one Japanese version that's served as Shift JIS. The site is generated using Perl. The problem: I'm serving Javascript akin to the following.…
Sir Hound
  • 94
  • 3
2
votes
1 answer

How can I create a CSV document in the Shift_JIS character set?

I can manaully force a CSV file to be detected as UTF-8 by adding a BOM, like so: file_put_contents($filename, "\xEF\xBB\xBF" . $csv); Is there a similar thing I can do to force a CSV file to be detected as Shift_JIS?
mum
  • 1,637
  • 11
  • 34
  • 58
1
vote
1 answer

Are there any problems converting between SHIFT_JIS and Unicode encodings?

I've heard there are (used to be?) ambiguous mappings between Unicode and SHIFT_JIS codes. This KB article somewhat proves this. So the question is: will I lose any data if I take SHIFT_JIS-encoded text, convert it to Unicode and back? Details: I'm…
DreamSonic
  • 1,454
  • 11
  • 19
1
vote
3 answers

get utf-8 character code given a shift-jis character code?

In my program I get shift-jis character codes as Python integers which I need to convert to their corresponding utf8 character codes (which should also be in integers). How can I do that? For ASCII you have the helpful functions ord()/chr() which…
Alex C
  • 13
  • 1
  • 5
1
vote
1 answer

Japanese fullwidth character ー is getting garbled when converted to SHIFT_JIS in Java

In my application, I am reading the data (Japanese text) from DB (UTF-8) and trying to write the output in SHIFT_JIS file format. However, full width ー (817C hex code in shift JIS) is getting converted as ? in the output file. Here is the sample…
Prince
  • 291
  • 1
  • 2
  • 9
1
vote
2 answers

How to convert hex string to Shift JIS encoding in java?

How can I convert a word's HEX code string to Shift JIS encoding? For example, I have a string: "90DD92E882F08F898AFA89BB82B582DC82B782A9" And I want to get the following output: 設定を初期化しますか
jose4ka
  • 11
  • 1
1
vote
3 answers

Converting shift-jis encoded file to to utf-8 in c++

I am trying with below code to convert from shift-jis file to utf-8, but when we open the output file it has corrupted characters, looks like something is missed out here, any thoughts? // From file FILE* shiftJisFile = _tfopen(lpszShiftJs,…
1
vote
1 answer

How to write Chinese / multi-byte characters in ESC/POS?

I would like to know how to write Chinese / multi-byte characters in ESC/POS. There is a reference table here: https://reference.epson-biz.com/modules/ref_charcode_en/index.php?content_id=110 And a guide to how to read the…
Yahya Uddin
  • 26,997
  • 35
  • 140
  • 231
1
vote
0 answers

Removing shiftIn and shiftout characters from utf8 file using java

I am receiving a file with shiftJis encoding. It has Japanese characters with shift in and shift out characters at the beginning and end of each multi byte string. As per my requirement, I have to convert this file to utf-8 and remove the SI and SO…
user1447718
  • 669
  • 1
  • 11
  • 23
1
vote
1 answer

HTTPS POST in shift-jis encoding

I'm trying to send a POST request to a server which decodes with SHIFT-JIS. This string サービス is being translated to 繧オ繝シ繝薙せ after being decoded in SHIFT-JIS. It seems like the request will always be encoded in UTF-8 whenever the request is being…
GT Foo
  • 11
  • 3
1
vote
1 answer

How to write data which is created in charset UTF8 into a file as charset Shift-JIS without missing character

I am working on creating file by querying data form DB and using it to create a file, the situation is as follows: Database: Oracle with charset UTF8 Applicaiton Server: Resin with charset UTF8 Application framework: NTT Intra-Mart (a japanese…
auwind
  • 11
  • 1
1
vote
2 answers

Decoding japanese circled numbers special characters

I'm trying to decode Japanese strings in a loop that reads a file with shift-jis. It works, but when it contains circled numbers characters like "①", I get the following error: UnicodeDecodeError: 'shift_jis' codec can't decode bytes in position…
Roxxxance
  • 11
  • 2
1
vote
1 answer

Using XOR on Shift-JIS characters in Java

So I'm trying to write a little decryption program but I'm running into a little trouble. I'm applying XOR to the characters with 'FF' (reversing all the bits) and I'm doing that by converting the string to a byte array then applying the XOR to it.…
Micki
  • 11
  • 3
1
vote
1 answer

Error parsing emails using Python's email module when the encoding is in shift_jis

I am getting an error that says "UnicodeDecodeError: 'shift_jis' codec can't decode bytes in position 2-3: illegal multibyte sequence" when I try to use my email parser to decode a shift_jis encoded email and convert it to unicode. The code and…
Alex V
  • 3,416
  • 2
  • 33
  • 52
1
vote
1 answer

Retrieving a specified glyph from freetype (SHIFT JIS encoded)?

Until now I used a texture (bitmapfont) for font rendering, but I'm trying to get freetype2 working. All my strings are SHIFT_JIS encoded and my only Problem is now to get from freetype the right glyph to a proper SHIFT_JIS bitsequence. But it seems…
Constantin
  • 8,721
  • 13
  • 75
  • 126