質問編集履歴

3

add

2023/02/05 17:56

投稿

banana3232
banana3232

スコア2

test CHANGED
File without changes
test CHANGED
@@ -7,9 +7,10 @@
7
7
  開発環境でreactを使ったWEB画面を作成しています。
8
8
  その際、日本語をWEB画面に表示させると文字化けしてしまいます。
9
9
 
10
+ http://localhost:3000
10
11
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-02-06/54e35e06-8ef8-4541-a62e-dcfdb3837235.png)
11
12
 
12
- ### 該当のソースコード
13
+ ### 関係しそうなソースコード
13
14
 
14
15
  ```pakage.json
15
16
  {
@@ -54,7 +55,8 @@
54
55
  }
55
56
  ```
56
57
 
58
+ index.html
57
- ```html
59
+ ```html X
58
60
  <!DOCTYPE html>
59
61
  <html lang="ja">
60
62
  <head>

2

add

2023/02/05 17:54

投稿

banana3232
banana3232

スコア2

test CHANGED
File without changes
test CHANGED
@@ -54,6 +54,54 @@
54
54
  }
55
55
  ```
56
56
 
57
+ ```html
58
+ <!DOCTYPE html>
59
+ <html lang="ja">
60
+ <head>
61
+ <meta charset="UTF-8" />
62
+ <link rel="icon" href="%PUBLIC_URL%/favicon.png" />
63
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
64
+ <meta name="theme-color" content="#000000" />
65
+ <meta
66
+ name="description"
67
+ content="Web site created using create-react-app"
68
+ />
69
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.png" />
70
+ <!--
71
+ manifest.json provides metadata used when your web app is installed on a
72
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
73
+ -->
74
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
75
+ <!--
76
+ Notice the use of %PUBLIC_URL% in the tags above.
77
+ It will be replaced with the URL of the `public` folder during the build.
78
+ Only files inside the `public` folder can be referenced from the HTML.
79
+
80
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
81
+ work correctly both with client-side routing and a non-root public URL.
82
+ Learn how to configure a non-root public URL by running `npm run build`.
83
+ -->
84
+ <title>Devconsultation</title>
85
+ </head>
86
+ <body>
87
+ <noscript>You need to enable JavaScript to run this app.</noscript>
88
+ <div id="root"></div>
89
+ <!--
90
+ This HTML file is a template.
91
+ If you open it directly in the browser, you will see an empty page.
92
+
93
+ You can add webfonts, meta tags, or analytics to this file.
94
+ The build step will place the bundled scripts into the <body> tag.
95
+
96
+ To begin the development, run `npm start` or `yarn start`.
97
+ To create a production bundle, use `npm run build` or `yarn build`.
98
+ -->
99
+ </body>
100
+ </html>
101
+
102
+ ```
103
+
104
+
57
105
  ### 試したこと
58
106
  projects\app\public\index.html に下記を追加しましたが変わりませんでした。。
59
107
  ```

1

dfa

2023/02/05 16:33

投稿

banana3232
banana3232

スコア2

test CHANGED
File without changes
test CHANGED
@@ -1,32 +1,63 @@
1
1
  ### 実現したいこと
2
-
3
- ここに実現したいことを箇条書き書いてください。
2
+ reactのweb開発で、
4
- - [ ] 日本語文字化けをしたい
3
+ ブラウザの日本語文字化けする現象解決したいです。
5
4
 
6
5
  ### 前提
7
6
 
8
- ここに質問の内容を詳しく書いてください。
9
- (例)
10
- TypeScriptで●●なシステムを作ています。
7
+ 開発環境でreactを使ったWEB画面を成しています。
11
- ■■な機能実装中以下のエラーメッセージが発生しました
8
+ その際、日本語WEB画面表示させると文字化けてしいます
12
9
 
13
- ### 発生している問題・エラーッセージ
10
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-02-06/54e35e06-8ef8-4541-a62e-dcfdb3837235.png)
14
-
15
- ```
16
- エラーメッセージ
17
- ```
18
11
 
19
12
  ### 該当のソースコード
20
13
 
21
- ```ここに言語名を入力
14
+ ```pakage.json
15
+ {
16
+ "name": "",
17
+ "version": "1.0.0",
18
+ "description": "",
19
+ "keywords": [],
20
+ "main": "src/index.tsx",
21
+ "dependencies": {
22
+ "@chakra-ui/icons": "1.0.4",
23
+ "@chakra-ui/react": "1.2.1",
24
+ "@emotion/react": "11.1.4",
25
+ "@emotion/styled": "11.0.0",
26
+ "@types/react-router-dom": "5.1.7",
27
+ "axios": "0.21.1",
28
+ "framer-motion": "3.3.0-beta.22",
29
+ "react": "17.0.1",
30
+ "react-dom": "17.0.1",
31
+ "react-router-dom": "5.2.0",
32
+ "react-scripts": "4.0.0"
22
- ソースコード
33
+ },
34
+ "devDependencies": {
35
+ "@types/react": "17.0.0",
36
+ "@types/react-dom": "17.0.0",
37
+ "typescript": "4.0.5"
38
+ },
39
+ "scripts": {
40
+ "start": "react-scripts start",
41
+ "build": "react-scripts build",
42
+ "test": "react-scripts test --env=jsdom",
43
+ "eject": "react-scripts eject"
44
+ },
45
+ "engines": {
46
+ "node": "16.x"
47
+ },
48
+ "browserslist": [
49
+ ">0.2%",
50
+ "not dead",
51
+ "not ie <= 11",
52
+ "not op_mini all"
53
+ ]
54
+ }
23
55
  ```
24
56
 
25
57
  ### 試したこと
58
+ projects\app\public\index.html に下記を追加しましたが変わりませんでした。。
59
+ ```
60
+ <meta charset="UTF-8" />
61
+ ```
62
+ 他にどこを確認、修正すれば解決できそうかご教授いただけますと幸いです。
26
63
 
27
- ここに問題に対して試したことを記載してください。
28
-
29
- ### 補足情報(FW/ツールのバージョンなど)
30
-
31
- ここにより詳細な情報を記載してください。
32
- 日本語文字化けを治したい治したいの文字化けを治したい