[10098] Re-apply to ACE hack for support utf8 config files

It has been applied in past to old config loading code.
This commit is contained in:
VladimirMangos 2010-06-23 07:02:20 +04:00
parent ae3ad10bcf
commit 6c6e642acc
2 changed files with 8 additions and 1 deletions

View file

@ -411,6 +411,13 @@ ACE_Ini_ImpExp::import_config (const ACE_TCHAR* filename)
if (!in)
return -1;
// MaNGOS addition: Try read utf8 header and skip it if exist for support utf8 format file
ACE_UINT32 utf8header = 0;
fgets((char*)&utf8header, 4, in); // Try read header
if (utf8header != ACE_UINT32(0x00BFBBEF)) // If not found
fseek(in, 0, SEEK_SET); // Reset read position
// MaNGOS addition - end
// @@ Make this a dynamic size!
ACE_TCHAR buffer[4096];
ACE_Configuration_Section_Key section;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10097"
#define REVISION_NR "10098"
#endif // __REVISION_NR_H__