|
From: SourceForge.net <no...@so...> - 2013-04-03 23:08:15
|
Feature Requests item #2084797, was opened at 2008-08-30 23:27 Message generated for change (Comment added) made by anders_k You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373088&aid=2084797&group_id=22049 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Scripting Group: None >Status: Closed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Amir Szekely (kichik) Summary: New constants to specify special characters in strings. Initial Comment: To go with the constants that can be used in strings, ($$, $\r, $\n, $\t), I suggest a set of constants that allow you to specify special ASCII characters in a string. It would be of the form "$\x__", where __ is a hexadecimal number between 00 (0) and FF (255). For example, "$\x99" would display the trade mark sign (ASCII 153). Sort of related: I would also like to see the curly single and double quotes (ASCII 145, 146, 147 and 148) be allowed to be used interchangably with the regular quote characters (', " and `). As pointless as this would be to a lot of people, it would allow someone to "beautify" their script, which I often like to do... Thanks. Brad. ---------------------------------------------------------------------- >Comment By: Anders (anders_k) Date: 2013-04-03 16:08 Message: ${U+1}...${U+FFFFFFFF} are now treated as a Unicode codepoint. ASCII ends at 127, dealing with quotes outside basic ASCII would be a pain in makensis because our strings are now wchar_t* internally and wchar_t is compiler specific... ---------------------------------------------------------------------- Comment By: Michael Madsen (pidgeot) Date: 2008-09-06 05:32 Message: Logged In: YES user_id=1340616 Originator: NO The quotes (U+2018, U+2019, U+201C, U+201D) would indeed be an issue when developing the install script on systems with different codepages, since their values are > U+0080 - but it is, of course, not an issue at run-time. Because of that, such a change (if implemented at all) should probably be deferred that until Jim's Unicode branch is merged into trunk. Thinking forward, the first part also has issues. The $\x syntax, although allowing for compile-time substitution, would either require a change when migrating to Unicode, or some kind of clever parsing where you prefix with 00 if you want a Unicode character X where U+007F < X < U+0100 - but even that might not work as intended, since I might have $\xA92008 - in an ANSI script on a Western European codepage, that would result in ©2008. In Unicode, parsing that would result in ꤠ08 (KAYAH LI LETTER VA, U+A920). IntFmt is actually slightly worse, because unlike the $\x syntax, you can't necessarily determine the output at compile-time, and even if you could, it has the same ANSI/Unicode value mismatch issue. It would, however, be easier to go beyond the BMP (U+10000 and up) A better solution, in my opinion is to just inline the character at leave it at that. It's trivial to start up Character Map (Start > Run > charmap) and find what you need, and it requires less work when migrating to Unicode. ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2008-09-05 05:04 Message: Logged In: YES user_id=584402 Originator: NO You can use IntFmt %c for the first part. As for the quotes, wouldn't that pose a problem with different codepages? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373088&aid=2084797&group_id=22049 |