mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Add unpacktool
This commit is contained in:
17
unpacktool/StringCommon.cpp
Normal file
17
unpacktool/StringCommon.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "StringCommon.h"
|
||||
|
||||
#include "MacRomanConversion.h"
|
||||
#include "UTF8.h"
|
||||
|
||||
void StringCommon::ConvertMacRomanFileName(std::vector<uint8_t> &utf8FileName, const uint8_t *macRomanName, size_t macRomanLength)
|
||||
{
|
||||
for (size_t i = 0; i < macRomanLength; i++)
|
||||
{
|
||||
uint8_t bytes[8];
|
||||
size_t bytesEmitted;
|
||||
PortabilityLayer::UTF8Processor::EncodeCodePoint(bytes, bytesEmitted, MacRoman::ToUnicode(macRomanName[i]));
|
||||
|
||||
for (size_t bi = 0; bi < bytesEmitted; bi++)
|
||||
utf8FileName.push_back(bytes[bi]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user