Japanese garbled in Monaca for Visual Studio

Asked 2 years ago, Updated 2 years ago, 127 views

If you write Japanese in the source code in Monaca for Visual Studio, the characters will be garbled.
There was no problem doing it on the browser.

The following sources

<!DOCTYPE HTML>
<html>
<head>
    <metacharset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scale=no">
    <script src="components/loader.js"></script>
    <link rel="stylesheet" href="components/loader.css">
    <link rel="stylesheet" href="css/style.css">
    <script>
        ons.bootstrap();
    </script>
</head>
<body>
    <ons-navigator var="myNavigator" page="page1.html">
    </ons-navigator> 
</body>
</html>
<ons-page>
    <html>
    <body>
        <ons-toolbar>
            <div class="center">test</div>
        </ons-toolbar>
        <div style="text-align:center">

            <br>
            <ons-button onclick="myNavigator.pushPage('page2.html')">
            Japanese language test
            </ons-button>


        </div>
    </body>
</html>
</ons-page>

monaca garbled-characters

2022-09-30 18:08

3 Answers

Although you have never used Monaca for Visual Studio, Visual Studio usually allows you to specify a character code for the file by right-clicking on the file in Solution Explorer and selecting the editor "Encoded ○○" in Select File Open Application.


2022-09-30 18:08

The saved character encoding may be set to something other than UTF-8.
When saving, select Save As and not Save Overwrite.

Unicode (no UTF-8 signature) - Code Page 65001

Try specifying the .


2022-09-30 18:08

Shift_JIS is no longer able to characterize


2022-09-30 18:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.