Add unpacktool

This commit is contained in:
elasota
2020-05-09 21:05:58 -04:00
parent b849d23f4e
commit ebb6d7608e
65 changed files with 6419 additions and 14 deletions

View 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]);
}
}