gwuhfuck!

Oct. 12th, 2004 01:18 am
hyuri: (Default)
[personal profile] hyuri
how does one convert ASCII representations of individual hex bytes into possibly multi‑byte Unicode characters?

wait. UTF-8...

Date: 2004-10-12 02:41 pm (UTC)
From: [identity profile] rizen.livejournal.com
If it's all ASCII, then you could just insert 0 bytes every other byte. I'm not sure if they need to be before or after. (I think it depends on LSB or MSB, and therefore platform.) But yeah, if it's true ASCII, then just calling it UTF-8 works just fine.

Date: 2004-10-12 04:02 pm (UTC)
From: [identity profile] hyuri.livejournal.com
Er, bad phrasing there, I suppose... I mean strings containing hex bytes as pairs of ASCII characters. Basically it’s going to require me to convert two‑character strings ([0-9A-F]{2}) to integers, bitor them with 0xFC, etc., etc..

Profile

hyuri: (Default)
hyuri

November 2014

S M T W T F S
      1
2345678
9101112131415
161718192021 22
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 23rd, 2026 04:12 pm
Powered by Dreamwidth Studios