Bug 95565 - Alt+X Unicode characters hexadecimal digits in uppercase using A..F
Summary: Alt+X Unicode characters hexadecimal digits in uppercase using A..F
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha1
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-04 10:35 UTC by Óvári
Modified: 2015-11-05 02:52 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Óvári 2015-11-04 10:35:04 UTC
Version: 5.1.0.0.alpha1+ (x64)
Build ID: b35e797ca0e2c7e7ad6dbccea6b92208b209677c
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-11-02_22:21:21

Should the hexadecimal digits A..E be in uppercase?
http://mathworld.wolfram.com/Hexadecimal.html

For example, the Unicode Character 'HYPHEN-MINUS' (U+002D)
currently shows:
U+002d
Should be:
U+002D

Thank you
Comment 1 Justin L 2015-11-04 13:13:23 UTC
I don't think this is important.  It certainly doesn't matter for the function itself.  Both uppercase and lowercase are legitimate Hex representations. The Alt-X feature just used the standard OUString() function used everywhere in LO, and that defaults to representing hexidecimaal using lowercase.   I don't see any reason to change that.
Comment 2 Óvári 2015-11-04 20:23:51 UTC
Thank you Justin L for your comment.

Yes both uppercase and lowercase are legitimate Hex representations. However, the Unicode planes and used code point ranges are shown in uppercase.
https://en.wikipedia.org/wiki/Plane_%28Unicode%29

If you think it is not important to follow the uppercase convention, feel free to close this bug.

Thank you
Comment 3 Julien Nabet 2015-11-04 21:17:19 UTC
Justin: what about this patch?
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index 8b56239..1d92b43 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -1242,7 +1242,7 @@ OUString ToggleUnicodeCodepoint::ReplacementString()
         sal_Int32 nPos = 0;
         while( nPos < sIn.getLength() )
         {
-            OUStringBuffer aTmp = OUString::number(sIn.iterateCodePoints(&nPos),16);
+            OUStringBuffer aTmp = OUString::number(sIn.iterateCodePoints(&nPos),16).toAsciiUpperCase();
             //pad with zeros - minimum length of 4.
             for( sal_Int32 i = 4 - aTmp.getLength(); i > 0; --i )
                 aTmp.insert( 0,"0" );

(of course qa part should be changed too)

Indeed, if hexa can be made in uppercase or lowercase, it seems that, in general, hexa are displayed with uppercase.
Comment 4 Adolfo Jayme Barrientos 2015-11-05 02:52:09 UTC
Closing as NOTABUG since it’s just a style of representation that does not affect the output in any way. Unicode does not mandate hexadecimal numbers to be uppercase.