VirtualBox

Ignore:
Timestamp:
Jun 4, 2015 7:04:13 PM (10 years ago)
Author:
vboxsync
Message:

VBoxExtPackHelperApp.cpp: Must use _wfreopen and not freopen on windows to correctly support non-ASCII strings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp

    r55671 r56247  
    18881888            case OPT_STDOUT:
    18891889            {
     1890# ifdef RT_OS_WINDOWS
     1891                PRTUTF16 pwszName = NULL;
     1892                rc = RTStrToUtf16(ValueUnion.psz, &pwszName);
     1893                if (RT_FAILURE(rc))
     1894                    return RTMsgErrorExit(RTEXITCODE_FAILURE, "Error converting '%s' to UTF-16: %Rrc\n", ValueUnion.psz, rc);
     1895                FILE *pFile = _wfreopen(pwszName, L"r+", ch == OPT_STDOUT ? stdout : stderr);
     1896                RTUtf16Free(pwszName);
     1897# else
    18901898                FILE *pFile = freopen(ValueUnion.psz, "r+", ch == OPT_STDOUT ? stdout : stderr);
     1899# endif
    18911900                if (!pFile)
    18921901                {
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