1
+ // NOTE: This file should be saved as UTF-8 w/ BOM
1
2
#include <httplib.h>
2
3
#include <signal.h>
3
4
@@ -241,7 +242,7 @@ TEST(DecodeURLTest, PercentCharacter) {
241
242
detail::decode_url(
242
243
R"(descrip=Gastos%20%C3%A1%C3%A9%C3%AD%C3%B3%C3%BA%C3%B1%C3%91%206)",
243
244
false),
244
- R"( descrip=Gastos áéíóúñÑ 6) ");
245
+ u8" descrip=Gastos áéíóúñÑ 6");
245
246
}
246
247
247
248
TEST(DecodeURLTest, PercentCharacterNUL) {
@@ -267,9 +268,9 @@ TEST(EncodeQueryParamTest, ParseReservedCharactersTest) {
267
268
}
268
269
269
270
TEST(EncodeQueryParamTest, TestUTF8Characters) {
270
- string chineseCharacters = "中国語";
271
- string russianCharacters = "дом";
272
- string brazilianCharacters = "óculos";
271
+ string chineseCharacters = u8 "中国語";
272
+ string russianCharacters = u8 "дом";
273
+ string brazilianCharacters = u8 "óculos";
273
274
274
275
EXPECT_EQ(detail::encode_query_param(chineseCharacters),
275
276
"%E4%B8%AD%E5%9B%BD%E8%AA%9E");
@@ -5289,7 +5290,7 @@ TEST(MountTest, MultibytesPathName) {
5289
5290
auto res = cli.Get("/日本語Dir/日本語File.txt");
5290
5291
ASSERT_TRUE(res);
5291
5292
EXPECT_EQ(StatusCode::OK_200, res->status);
5292
- EXPECT_EQ("日本語コンテンツ", res->body);
5293
+ EXPECT_EQ(u8 "日本語コンテンツ", res->body);
5293
5294
}
5294
5295
5295
5296
TEST(KeepAliveTest, ReadTimeout) {
0 commit comments