Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!decwrl!shlump.dec.com!mountn.dec.com!minow From: minow@mountn.dec.com (Martin Minow) Newsgroups: comp.sys.mac.programmer Subject: Re: conversion between hex and dec Message-ID: <360@mountn.dec.com> Date: 26 Jun 89 16:06:58 GMT References: <1300@osupyr.mps.ohio-state.edu> <354@mountn.dec.com> <7765@hoptoad.uucp> Reply-To: minow%thundr.dec@decwrl.dec.com (Martin Minow) Organization: Digital Equipment Corporation Lines: 21 In article <7765@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) notes that the hex->ascii conversion program I posted was not internationalized. Touche. Umm, Touche. Err, Touch-e-", Hmm, never mind. The simplest way to internationalize this would be to define a STR resource containing the text representation of the hex equivalents. Then, after pulling off four bits, you need only store the character at (*hex_string)[v]. Note that, to do the job right, you'll have to know the number of bytes in a character. Note that the same problem occurs in decimal->ascii conversion: Hebrew, Arabic, and Japanese are among those languages that have "native" digit representations that are used alongside, and sometimes in place of, 0..9. (It is especially important to realize that the choice of digit representation may be dependent on the meaning of the text: dates and prices may use one format, while scientific data uses another. Martin Minow minow%thundr.dec@decwrl.dec.com