]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/resbund_cnv.cpp
45c0b399bfff459598d71c15bf491e9df3649d16
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *******************************************************************************
6 * Copyright (C) 1997-2006, International Business Machines
7 * Corporation and others. All Rights Reserved.
9 *******************************************************************************
10 * file name: resbund_cnv.cpp
12 * tab size: 8 (not used)
15 * created on: 2004aug25
16 * created by: Markus W. Scherer
18 * Character conversion functions moved here from resbund.cpp
21 #include "unicode/utypes.h"
22 #include "unicode/resbund.h"
27 ResourceBundle::ResourceBundle( const UnicodeString
& path
,
30 :UObject(), fLocale(NULL
)
32 constructForLocale(path
, locale
, error
);
35 ResourceBundle::ResourceBundle( const UnicodeString
& path
,
37 :UObject(), fLocale(NULL
)
39 constructForLocale(path
, Locale::getDefault(), error
);
43 ResourceBundle::constructForLocale(const UnicodeString
& path
,
48 fResource
= ures_open(NULL
, locale
.getName(), &error
);
51 UnicodeString
nullTerminatedPath(path
);
52 nullTerminatedPath
.append((UChar
)0);
53 fResource
= ures_openU(nullTerminatedPath
.getBuffer(), locale
.getName(), &error
);