Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::String uses UTF-16 BE or LE?  (Read 2568 times)

0 Members and 1 Guest are viewing this topic.

Dravere

  • Newbie
  • *
  • Posts: 37
    • View Profile
sf::String uses UTF-16 BE or LE?
« on: December 01, 2008, 01:00:44 am »
Hello,

The question is in the title. What does sf::String use for UTF-16 Strings, the Big Endian or the Little Endian version? Also what about the sf::Event::TextEvent::Unicode attribute?

Thx for your help.

Dravere

P.S: Just started a few days ago with SFML. As far I pretty much like your library, good work!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sf::String uses UTF-16 BE or LE?
« Reply #1 on: December 01, 2008, 07:52:10 am »
First of all, SFML will no longer use UTF-16 (UCS2 actually) but UTF-32 in the coming 1.4 release.

It uses the native endianess of the platform; so it may be UTF-32 LE on Windows and Linux platforms, and UTF-32 BE on MacOS platforms.
Laurent Gomila - SFML developer

christoph

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.christoph-egger.org
sf::String uses UTF-16 BE or LE?
« Reply #2 on: December 01, 2008, 08:17:50 pm »
Hehe, Linux has a lot of BE platforms, too. It's not that uncomon to run Linux on some PowerPC machine ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sf::String uses UTF-16 BE or LE?
« Reply #3 on: December 01, 2008, 09:45:59 pm »
Ok, well, just ignore the last part of my sentence ;)
Laurent Gomila - SFML developer

Dravere

  • Newbie
  • *
  • Posts: 37
    • View Profile
sf::String uses UTF-16 BE or LE?
« Reply #4 on: December 02, 2008, 03:07:38 pm »
Thank you for the information.

What is the timetable on version 1.4? I just saw in the documentation that there will be also a very helpful unicode class. :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sf::String uses UTF-16 BE or LE?
« Reply #5 on: December 02, 2008, 03:49:39 pm »
Version 1.4 should be released within one or two weeks.
Laurent Gomila - SFML developer