home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,332 of 243,242   
   Michael S to bart   
   Re: Unicode...   
   03 Dec 25 22:43:05   
   
   From: already5chosen@yahoo.com   
      
   On Wed, 3 Dec 2025 20:15:02 +0000   
   bart  wrote:   
   >    
   >    
   > This looks like a solution for a fixed-pitch font. I get this output   
   > for a Windows console display (with - used for space):   
   >    
   > hello---strlen: 5  utf8 display width: 5   
   > Café----strlen: 5  utf8 display width: 4   
      
   It sounds as a luck. é in your text just happened to be encoded as   
   U+00E9. What if it was encoded as U+0065,U+00B4 ? (Hopefully, I got the   
   correct code, I can't really distinguish between similar diacritics).   
      
      
   > 漢字----strlen: 6  utf8 display width: 4   
   > ✓-------strlen: 3  utf8 display width: 1   
   > 🙂------strlen: 4  utf8 display width: 2   
   >    
   > I was hoping this would be lined up, but already, in a Thunderbird   
   > edit Window, the last lines aren't lined up properly.   
   >    
   > Same problem with Notepad (fixed pitch) and LibreOffice (fixed pitch).   
   >    
   > It only looks alright in Windows and WSL consoles/terminals. But   
   > maybe that's all that's needed.   
   >    
   >    
   >    
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca