forked from kiryun/nickname_gen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunicode.cpp
59 lines (41 loc) · 910 Bytes
/
unicode.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <bits/stdc++.h>
using namespace std;
int main()
{
u16string in = u"김기현";
string s;
cin>>s;
stringstream out;
int arr[3];
int i = 0;
for (auto x : in){
out << hex << "U+" << x << " ";
arr[i] = x;
i++;
}
cout<<endl;
cout << out.str();
cout<<endl;
for(int i = 0; i<sizeof(arr)/sizeof(int); i++){
printf("%x ", arr[i]);
// cout<<arr[i]<<" ";
}
cout<<endl;
return 0;
}
// int main(){
// // setlocale(LC_ALL, "Korean");
// wchar_t* name = new wchar_t[255];
// wscanf(L"%ls", name);
// wprintf(L"%ls\n", name);
// // wprintf(L"%d\n", wcslen(name));
// //unicode hex
// int i = 0;
// while(name[i] != NULL){
// printf("%x ",name[i]);
// i++;
// }
// printf("\n");
// //unicode hex point
// return 0;
// }