[
https://issues.apache.org/jira/browse/CB-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13876102#comment-13876102
]
puchen commented on CB-5477:
----------------------------
---------------------------- wp7/template/App.xaml ----------------------------
index 18072fe..89527ab 100644
@@ -1,4 +1,4 @@
-锘¿<!--
+<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
--------------------------- wp7/template/App.xaml.cs ---------------------------
index e0ca261..4665aa9 100644
@@ -1,4 +1,4 @@
-锘¿/*
+/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
-------------------- wp7/template/CordovaWP7AppProj.csproj --------------------
index a4402da..bfcb31c 100644
@@ -1,4 +1,4 @@
-锘¿<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
-------------------------- wp7/template/MainPage.xaml --------------------------
index e066fa6..0ac78b4 100644
@@ -1,4 +1,4 @@
-锘
+
<phone:PhoneApplicationPage
x:Class="$safeprojectname$.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
------------------------ wp7/template/MainPage.xaml.cs ------------------------
index 187228c..092adad 100644
@@ -1,4 +1,4 @@
-锘¿/*
+/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
------------------ wp7/template/Properties/WMAppManifest.xml ------------------
index 40c5d26..c67b032 100644
@@ -1,4 +1,4 @@
-锘¿<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment"
AppPlatformVersion="7.1">
<App xmlns="" ProductID="{$guid1$}" Title="$safeprojectname$"
RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal"
---------------------------- wp8/template/App.xaml ----------------------------
index 18072fe..89527ab 100644
@@ -1,4 +1,4 @@
-锘¿<!--
+<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
--------------------------- wp8/template/App.xaml.cs ---------------------------
index e0ca261..4665aa9 100644
@@ -1,4 +1,4 @@
-锘¿/*
+/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
-------------------- wp8/template/CordovaWP8AppProj.csproj --------------------
index 960db28..7e8a9cd 100644
@@ -1,4 +1,4 @@
-锘¿<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
------------------------ wp8/template/MainPage.xaml.cs ------------------------
index 187228c..092adad 100644
@@ -1,4 +1,4 @@
-锘¿/*
+/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
------------------ wp8/template/Properties/WMAppManifest.xml ------------------
index 488cf93..68f2e01 100644
@@ -1,4 +1,4 @@
-锘¿<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment"
AppPlatformVersion="8.0">
<DefaultLanguage xmlns="" code="en-US" />
<Languages xmlns="">
>>
you see these files first line were start characters "锘¿"
i change these files ecoding from utf-8-->ascii, it work ok now!
> cordova CLI can't create WP8 project with encode issue!
> -------------------------------------------------------
>
> Key: CB-5477
> URL: https://issues.apache.org/jira/browse/CB-5477
> Project: Apache Cordova
> Issue Type: Bug
> Components: CLI, WP8
> Environment: win8(simple chinese)+vs2012+wp8sdk
> Reporter: puchen
> Assignee: Jesse MacFadyen
> Priority: Critical
> Fix For: 3.4.0
>
>
> descrip:
> C:\Windows\system32>cordova -v
> 3.2.0-0.1.0
> cordova create hello com.example.hello HelloWorld
> cd hello
> cordova platform add wp8
> got errors:
> D:\VSProject\helloCordova>cordova platform add wp8
> Checking wp8 requirements...
> Creating wp8 project...
> [Error: Non-whitespace before first tag.
> Line: 0
> Column: 1
> Char: �]
> Finally I found following files
> wmappmanifest.xml, HelloCordova.csproj, HelloCordova.sln, MainPage.xaml.cs,
> etc
> were corrupt, the start characters of file content were sth like
> 锘?*
> the cli can't parse these files
> I think it's an encoding issue
> here is sample issue https://issues.apache.org/jira/browse/CB-4618
> my opinion:
> i check the corodova cli source code, i found it's this file
> ".cordova\lib\wp\cordova\3.2.0\wp8\bin\create.js" caused this error!
> in create.js file:
> function write(filename, contents) {
> var f=fso.OpenTextFile(filename, ForWriting, TristateTrue);
> f.Write(contents);
> f.Close();
> }
> WScript OpenTextFile Method :
> http://msdn.microsoft.com/en-us/library/314cz14s(v=vs.84).aspx
> OpenTextFile Method have 4 args but
> fso.OpenTextFile miss a args create,
> OpenTextFile should open file with "unicode" encode,because cordova wp8 cli
> template project files are encode with "utf-8". if we not specified encode
> OpenTextFile should use system default encode ascii.
> cordova template files were encoded with utf8, opentext and wirte with ascii,
> then save thems will cause encode issue!
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)