Search Engines still suck!

Searching for development information on the net still sucks. I run into this several times a month. Maybe I just don’t know how to search well but while I assume the answer is somewhere I seem to almost never be able to find it.

For example, I need to know how to convert a unicode string to shift-jis in Javascript/JScript. Since the code is running locally I don’t mind if it’s IE/Windows specific. So far I have not found an answer after 3 hours of searching.

I also need to know how to prevent IE from entifying the codes. What I mean by that is currently, internally it’s storing 2 unicode code points, both > 8 bit. When it sends them to the form I’m trying to deal with it turns them into entities like &54321;&51234; instead of leaving them as and escaping them as in %D4%31%%C8%22 which is what I need to send to the server in question. Trying to search for how to handle that also no luck.

My understanding is that local JScript code can call into the Windows API. If I could do that I might be able to use the Windows API to convert from unicode to shift-jis. I don’t remember how to do this and so far after hours of searching I have not found an example.

It’s very frustrating, probably specifically because the answer has to be there somewhere. Somebody knows the answer. If I could actually find those answers I could get my job done at least 25% faster it feels like.

When some company makes a search engine that finds those answers they’ll put google out of business.

  • dma
  • I forgot to check usenet.  Thank you for reminding me

    Unfortunately I didn’t find an answer there.  Lots about unicode and shift-jis but nothing about Jscript/Javascript Unicode to Shift-JIS conversion.  A little about VBScript Unicode to Shift-JIS conversion maybe.

  • UTF-8

    I think the way Internet Explorer encodes posted form data may have to do with the reported content-type of the page. My pages all contain the following meta tag:

    When I use that meta tag, the hand-coded message board on my site receives Japanese form data just fine.

    Hope that helps.

  • unfortunately

    I don’t have control of the content-type.  I’m writing a plugin for Dave’s Quick Search Deskbar, that bar sits in the taskbar and uses UTF-8 so it can handle any input.

    I’m trying to write a plugin for this Japanese<->English dictionary.  Getting English to Japanese was easy.  I can now type “ej development” to lookup the Japanese word for “development”.  I’m trying to make one for Japanese to English and in that case I need to send the data in the form expected by that site.  It expects JIS (not Shift-JIS) and it expects it escaped with %HH%HH not with &#####;