質問編集履歴
1
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -263,3 +263,37 @@
|
|
263
263
|
06,248,108
|
264
264
|
|
265
265
|
```
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
【補足】
|
270
|
+
|
271
|
+
問題の部分を変更しました
|
272
|
+
|
273
|
+
```ここに言語を入力
|
274
|
+
|
275
|
+
virtual void PXCAPI OnRecognition(const PXCSpeechRecognition::RecognitionData *data) {
|
276
|
+
|
277
|
+
wprintf_s(L"Output %s\n", data->scores[0].sentence);
|
278
|
+
|
279
|
+
//std::ofstream ofs(path);
|
280
|
+
|
281
|
+
wstring_convert<codecvt_utf8<wchar_t>, wchar_t> cv;
|
282
|
+
|
283
|
+
wstring wstr = wstring(data->scores[0].sentence);
|
284
|
+
|
285
|
+
string str = cv.to_bytes(wstr);
|
286
|
+
|
287
|
+
cout << str << endl;
|
288
|
+
|
289
|
+
//ofs << wstr//2018.05.02 問題の箇所
|
290
|
+
|
291
|
+
//ofs.close();
|
292
|
+
|
293
|
+
}
|
294
|
+
|
295
|
+
```
|
296
|
+
|
297
|
+
コンソールで実行すると、strが文字化けしています。
|
298
|
+
|
299
|
+
日本語のため、まだ追加処理が必要なのでしょうか?
|