character page 4 - Dave's Blog

Search
My timeline on Mastodon

Cryoflesh - Jackets

2008 Feb 26, 11:58This is the sort of clothing I imagine the characters in Neuromancer wearing.PermalinkCommentsclothing shirts purchase product jacket cyberpunk

Web Q&A: XPath, XML Notepad, Data Islands, Case Sensitivity, XSL, and More -- MSDN Magazine, September 2001

2008 Feb 7, 2:36To summ up the last Q&A, the one I was interested in: "Is there any way to escape the characters " and ' in an XPath expression...". And their answer is no. Lame. I thought XPath folk would have defined this.PermalinkCommentsmicrosoft msdn xpath xml article

i18n: languages, countries and character sets

2007 Nov 7, 4:28Out of date W3C document containing stats on frequency of use of various charsets in HTML pages (in 1997)PermalinkCommentscharset encoding i18n language reference w3c statistics

Worse Than Failure - Character encoding WTF

2007 Oct 19, 4:10FTA: 'This letter was sent to a Russian student by her French friend, who manually wrote the address that he received by e-mail. His e-mail client, unfortunately, was not set up correctly to display Cyrillic characters, so they were substituted with diacrPermalinkCommentsencoding charset unicode language humor article

Non-ASCII characters in URI attribute values

2007 Aug 23, 6:17From the HTML standard, what to do if you find a URI with a non-US-ASCII character.PermalinkCommentsuri standard reference unicode utf8 encoding ascii iri

Which which - Batch File Hackiness

2007 Aug 9, 5:41To satisfy my hands which have already learned to type *nix commands I like to install Win32 versions of common GNU utilities. Unfortunately, the which command is a rather literal port and requires you to enter the entire name of the command for which you're looking. That is 'which which' won't find itself but 'which which.exe' will. This makes this almost useless for me so I thought to write my own as a batch file. I had learned about a few goodies available in cmd.exe that I thought would make this an easy task. It turned out to be more difficult than I thought.

for /F "usebackq tokens=*" %%a in ( `"echo %PATH:;=& echo %"` ) do (
    for /F "usebackq tokens=*" %%b in ( `"echo %PATHEXT:;=& echo %"` ) do (
        if exist "%%a"\%1%%b (
            for  %%c in ( "%%a"\%1%%b ) do (
                echo %%~fc
            )
        )
    )
)
The environment variables PATH and PATHEXT hold the list of paths to search through to find commands, and the extensions of files that should be run as commands respectively. The 'for /F "usebackq tokens=*" %%a in (...) do (...)' runs the 'do' portion with %%a sequentially taking on the value of every line in the 'in' portion. That's nice, but PATH and PATHEXT don't have their elements on different lines and I don't know of a way to escape a newline character to appear in a batch file. In order to get the PATH and PATHEXT's elements onto different lines I used the %ENV:a=b% syntax which replaces occurrences of a with b in the value of ENV. I replaced the ';' delimiter with the text '& echo ' which means %PATHEXT:;=& echo% evaluates to something like "echo .COM& echo .EXE& echo .BAT& ...". I have to put the whole expression in double quotes in order to escape the '&' for appearing in the batch file. The usebackq and the backwards quotes means that the backquoted string should be replaced with the output of the execution of its content. So in that fashion I'm able to get each element of the env. variable onto new lines. The rest is pretty straight forward.

Also, it supports wildcards:
C:\Users\davris>which.cmd *hi*
C:\Windows\System32\GRAPHICS.COM
C:\Windows\System32\SearchIndexer.exe
D:\bin\which.exe
D:\bin\which.cmd
PermalinkCommentswhich cmd technical batch for

Chicken Roundup

2007 Jul 11, 3:52I realized that I have short list of chicken related things I find humorous and they're all available for the linking to via youtube.

Chicken: The Powerpoint Presentation. This is a power point presentation of a research paper written in the language chicken. (video)

Bluth Family Chicken Dances. From the show Arrested Development many Bluth family members had their own chicken dance. (video)

Peter Fights the Giant Chicken. A man sized chicken fights Peter from Family Guy for multiple minutes in several episodes mimicking famous action sequences. I must admire the writers dedication to the gag. (video1, video2)

PermalinkCommentsroundup video personal chicken humor nontechnical

HTML 4.01 - Encoding URIs with international characters

2007 Jul 11, 10:36How to encode URIs that contain international characters as specified by the HTML spec.PermalinkCommentshtml uri encoding iri unicode utf8

Second Life Translator

2007 Jul 4, 10:58Hackdiary
I really enjoy reading Matt Biddulph's blog hackdiary. An entry some time ago talked about his Second Life flickr screen which is a screen in Second Life that displays images from flickr.com based on viewers suggested tags. I'm a novice to the Second Life scripting API and so it was from this blog post I became aware of the llHTTPRequest. This is like the XMLHttpRequest for Second Life code in that it lets you make HTTP requests. I decided that I too could do something cool with this.

Translator
I decided to make a translator object that a Second Life user would wear that would translate anything said near them. The details aren't too surprising: The translator object keeps an owner modifiable list of translation instructions each consisting of who to listen to, the language they speak, who to tell the translation to, and into what language to translate. When the translator hears someone, it runs through its list of translation instructions and when it finds a match for the speaker uses the llHTTPRequest to send off what was said to Google translate. When the result comes back the translator simply says the response.

Issues
Unfortunately, the llHTTPRequest limits the response size to 2K and no translation site I can find has the translated text in the first 2K. There's a flag HTTP_BODY_MAXLENGTH provided but it defaults to 2K and you can't change its value. So I decided to setup a PHP script on my site to act as a translating proxy and parse the translated text out of the HTML response from Google translate. Through experimentation I found that their site can take parameters text and langpair queries in the query like so: http://translate.google.com/translate_t?text=car%20moi%20m%C3%AAme%20j%27en%20rit&langpair=fr|en. On the topic of non US-ASCII characters (which is important for a translator) I found that llHTTPRequest encodes non US-ASCII characters as percent-encoded UTF-8 when constructing the request URI. However, when Google translate takes parameters off the URI it only seems to interpret it as percent-encoded UTF-8 when the user-agent is IE's. So after changing my PHP script to use IE7's user-agent non US-ASCII character input worked.

In Use
Actually using it in practice is rather difficult. Between typos, slang, abbreviations, and the current state of the free online translators its very difficult to carry on a conversation. Additionally, I don't really like talking to random people on Second Life anyway. So... not too useful.PermalinkCommentspersonal translate second-life technical translator sl code google php llhttprequest

Ozzie

2007 Jun 25, 3:13I keep seeing 'Ozzie' on emails and such now due mainly to Ray Ozzie who is now the Chief Software Architect at Microsoft and his brother Jack Ozzie. Whenever I see his name I think of Ozzie from Chrono Trigger. He was one third of a trio of villains, the other two being Flea and Slash. I feel like I should be thinking of the Ozzy for which this Ozzie was named but I really don't.
Ray Ozzie. Links to license.Ozzie from Chrono Trigger. Links to license.Ozzy Osbourne. Links to license.
My next thought on Ozzie is the Scottish guy who went to my high school. He'd shout 'Ozzie! Ozzie! Ozzie!' to which listeners were compelled to respond 'Oi! Oi! Oi!'. The wikipedia article on the chant has some thoughts on the origins but I suppose at Microsoft it could take on entirely new meaning. I really hope I'm someday in a meeting with Ray or Jack Ozzie and have the opportunity...PermalinkCommentsozzy personal ozzie random nontechnical

Sorting It All Out : Putting the 'U' in Unicode (and the 'G' in Galacticode)

2007 Jun 11, 2:46Humorous and interesting exchange on the Unicode mailing list concerning the velocity of Unicode character additions and the ability to accomidate alien (as in e.t.) writing systems.PermalinkCommentsblog humor unicode language microsoft article alien et

Ozzie - Characters of Chrono Trigger - Wikipedia, the free encyclopedia

2007 May 24, 10:48Whenever I see references to Ray Ozzie (Chief Software Arch at MS) I always think of Ozzie the evil guy from Chrono Trigger.PermalinkCommentswikipedia article wiki ozzie chronotrigger videogames

Reverse Latin Script

2007 May 11, 3:48Type in some latin script and you'll get back a string of Unicode characters that looks like its rotated 180 degrees. More info on exciting Unicode codepoints.PermalinkCommentsunicode javascript tool tools web language

OS-Tan - Gallery: Lamest Technology Mascots Ever (Wired)

2007 May 2, 1:00Apparently there's something called OS-tan in which Windows OSes are represented as anime styled characters. Very odd.PermalinkCommentsarticle os-tan humor images weird anime

Movie Times

2007 May 1, 3:48The Sunday of the weekend before last I had friends over and we watched Antitrust and Sneakers. Watching Antitrust makes me wonder if Bill Gates has seen it. Tim Robbins plays a character that is essentially based on him but so over the top that its ridiculous.

A few days before that I watched The Prestige with Sarah. I can't tell if I was or wasn't supposed to know what was going on until the end but it was cool anyway. I didn't know until later but David Bowie plays Tesla which is just awesome all the way around.

We also watched The Illusionist sometime before. Both movies are adaptations of novels with stage magicians set in turn of the century England. And I enjoyed both of them. I thought one would be a rushed attempt by one studio to compete with the another on the same ground but that doesn't seem to be the case. I've noticed this before with those asteroid disaster movies and the two movies about Truman Capote. It turns out Wikipedia has a huge list of competing similar movies.PermalinkCommentspersonal movies nontechnical

decodeunicode.org . Last Entries

2007 Mar 29, 5:40A Wiki about Unicode codepoints. Add notes concerning your favorite character.PermalinkCommentsunicode wiki social

Extensible Markup Language (XML) 1.0 (Third Edition)

2007 Mar 8, 1:02Defintion of the escape mechanism used in XML.PermalinkCommentsxml escape encoding reference w3c standard character-entity-reference

ishida >> utilities: Unicode character pickers

2007 Feb 14, 3:12Another of Richard's tools that allows you to compose strings by visually picking characters from particular alphabets.PermalinkCommentsunicode tools picker encoding javascript language tool codepage i18n

UniView 5.0 (en) (© Richard Ishida)

2007 Feb 14, 3:10Richard Ishida's tool to display blocks of Unicode characters.PermalinkCommentsunicode tools i18n tool utf8 uniview encoding richard-ishida

RFC 1468 - Japanese Character Encoding for Internet Messages

2007 Jan 31, 4:56IETF's standard for ISO 2022 JP that defines a character encoding that wraps other Japanese character encodings.PermalinkCommentscodepage encoding windows programming iso-2022 charset japanese ietf rfc
Older EntriesNewer Entries Creative Commons License Some rights reserved.