crelf Posted June 19, 2006 Report Share Posted June 19, 2006 File Name: Convert between ASCII and Unicode File Submitter: crelf File Submitted: 19 Jun 2006 File Updated: 3 Nov 2006 File Category: General Convert between ASCII and Unicode Click here to download this file Quote Link to comment
lavezza Posted November 2, 2006 Report Share Posted November 2, 2006 In 'Convert Unicode to ASCII.vi', I don't think the increment should be there. Feeding the results of 'Convert ASCII to Unicode.vi' into 'Convert Unicode to ASCII.vi' should give back the original string. Pat Lavezza Quote Link to comment
crelf Posted November 3, 2006 Author Report Share Posted November 3, 2006 In 'Convert Unicode to ASCII.vi', I don't think the increment should be there. Good catch! :thumbup: I've updated it. Quote Link to comment
Mikkel Posted November 3, 2006 Report Share Posted November 3, 2006 What about this solution? -Mikkel Quote Link to comment
crelf Posted November 3, 2006 Author Report Share Posted November 3, 2006 What about this solution? That algorithm is much faster than the original one - thanks! (I always forget about that bloody interleve thing!) I've updated the submission Quote Link to comment
Mikkel Posted November 3, 2006 Report Share Posted November 3, 2006 That algorithm is much faster than the original one - thanks! (I always forget about that bloody interleve thing!) I've updated the submission I actually hadn't noticed that you could resize 'Replace Array Subset' for use on several elements before - as you used it in the original code. You learn - or relearn - something every day -Mikkel Quote Link to comment
jpdrolet Posted November 3, 2006 Report Share Posted November 3, 2006 What about these solutions ? Quote Link to comment
Mikkel Posted November 3, 2006 Report Share Posted November 3, 2006 What about these solutions ? In my crude 'benchmark' your ASCII->UNICODE is actually slightly slower that my solution. But yours does have a higher 'coolness/simplicity'-score :thumbup: -Mikkel Quote Link to comment
crelf Posted November 3, 2006 Author Report Share Posted November 3, 2006 What about these solutions ? Your UNIcode -> ASCII doesn't check that the first character is a \00 (if it is, then it's part of an extended character set and hence non-ASCII). Quote Link to comment
Aristos Queue Posted November 3, 2006 Report Share Posted November 3, 2006 It seems unlikely that your UNICODE-->ASCII works given all the possible UNICODE encodings. I say this, not because I'm an expert in Unicode, but because I know how much I don't know. For example, http://billposer.org/Software/uni2ascii.html This is an open source ASCII-->UNICODE-->ASCII tool. Notice the revision history? This simple tool has a change log that goes for pages and talks about support for multiple encodings, etc. Further, the standards document for unicode has *chapters*. Compare that with your standard listing of the ASCII standard, which is just a table of 256 characters. Here's the motherload of information about unicode: http://www.unicode.org/unicode/faq/ Quote Link to comment
crelf Posted November 4, 2006 Author Report Share Posted November 4, 2006 It seems unlikely that your UNICODE-->ASCII works given all the possible UNICODE encodings. I say this, not because I'm an expert in Unicode, but because I know how much I don't know. You're absolutely right - my submission only works for the 7bit ASCII page, not any of the extended or other pages (it actually checks that the UNIcode input is convertable to the 7bit page). As you suggest, a code snippet that covers all pages would be comprehensive indeed. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.