VirtualBox

Ignore:
Timestamp:
Jun 12, 2017 9:48:11 AM (8 years ago)
Author:
vboxsync
Message:

IPRT: Added RTStrToUtf16BigEx and RTStrToUtf16Big for turning UTF-8 into UTF-16BE (big endian).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/fs/iso9660vfs.cpp

    r67326 r67334  
    688688
    689689/**
    690  * RTStrToUtf16Ex returning big-endian UTF-16.
    691  */
    692 static int rtFsIso9660_StrToUtf16BigEndian(const char *pszString, size_t cchString, PRTUTF16 *ppwsz, size_t cwc, size_t *pcwc)
    693 {
    694     int rc = RTStrToUtf16Ex(pszString, cchString, ppwsz, cwc, pcwc);
    695 #ifndef RT_BIG_ENDIAN
    696     if (RT_SUCCESS(rc))
    697     {
    698         PRTUTF16 pwc = *ppwsz;
    699         RTUTF16  wc;
    700         while ((wc = *pwc))
    701             *pwc++ = RT_H2BE_U16(wc);
    702     }
    703 #endif
    704     return rc;
    705 }
    706 
    707 
    708 /**
    709690 * Looks up the shared structure for a child.
    710691 *
     
    774755    {
    775756        PRTUTF16 pwszEntry = uBuf.wszEntry;
    776         rc = rtFsIso9660_StrToUtf16BigEndian(pszEntry, RTSTR_MAX, &pwszEntry, RT_ELEMENTS(uBuf.wszEntry), &cwcEntry);
     757        rc = RTStrToUtf16BigEx(pszEntry, RTSTR_MAX, &pwszEntry, RT_ELEMENTS(uBuf.wszEntry), &cwcEntry);
    777758        if (RT_FAILURE(rc))
    778759            return rc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette