blob: 5aaa53c726a7a697ac243501ee556224c8f38f4b [file] [log] [blame]
Dan Sinclair1770c022016-03-14 14:14:16 -04001// Copyright 2014 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Dan Sinclaire7786682017-03-29 15:18:41 -04007#ifndef FXBARCODE_BC_UTILCODINGCONVERT_H_
8#define FXBARCODE_BC_UTILCODINGCONVERT_H_
Dan Sinclair1770c022016-03-14 14:14:16 -04009
Tom Sepez8b6186f2017-03-28 12:06:45 -070010#include <vector>
11
dsinclaira52ab742016-09-29 13:59:29 -070012#include "core/fxcrt/fx_basic.h"
Dan Sinclair1770c022016-03-14 14:14:16 -040013
14class CBC_UtilCodingConvert {
15 public:
16 CBC_UtilCodingConvert();
17 virtual ~CBC_UtilCodingConvert();
18 static void UnicodeToLocale(const CFX_WideString& source,
19 CFX_ByteString& result);
20 static void LocaleToUtf8(const CFX_ByteString& source,
21 CFX_ByteString& result);
tsepez82aa3962017-01-20 12:59:50 -080022 static void LocaleToUtf8(const CFX_ByteString& source,
Tom Sepez8b6186f2017-03-28 12:06:45 -070023 std::vector<uint8_t>& result);
24 static void Utf8ToLocale(const std::vector<uint8_t>& source,
tsepez82aa3962017-01-20 12:59:50 -080025 CFX_ByteString& result);
Dan Sinclair1770c022016-03-14 14:14:16 -040026 static void Utf8ToLocale(const uint8_t* source,
27 int32_t count,
28 CFX_ByteString& result);
29 static void UnicodeToUTF8(const CFX_WideString& source,
30 CFX_ByteString& result);
31};
32
Dan Sinclaire7786682017-03-29 15:18:41 -040033#endif // FXBARCODE_BC_UTILCODINGCONVERT_H_