Using code written on a Mac - weird characters


#1

Now that my app builds, I keep seeing a lot of errors in the console. Code was written on a Mac and simply copied over. Are the errors happening because of some Mac font voodoo? And how do I fix it? When I open it in VS2015 (my environment of choice), I don’t see any problems with the file, no weird characters, everything seems alright.


C:\nativescript-projects\Hub\app\views\login._login.xml has syntax errors.
error
element parse error: Error: attribute value must after “=”
@#[line:4,col:8]
error
element parse error: Error: invalid tagName:
@#[line:5,col:59]
warning
attribute “�١H�” missed value!! “�١H�” instead!!
@#[line:5,col:256]
warning
attribute “��” missed value!! “��” instead!!
@#[line:5,col:256]
warning
attribute “iL���(����d�” missed value!! “iL���(����d�” instead!!
@#[line:5,col:256]
error
element parse error: Error: invalid attribute:iL���(����d�
@#[line:5,col:256]

C:\nativescript-projects\Hub\app\views\mainmenu._mainmenu.xml has syntax errors.
error
element parse error: Error: invalid tagName:-�ߗ�
@#[line:3,col:55]
error
element parse error: Error: invalid tagName:4#�o
@#[line:3,col:83]
error
element parse error: Error: invalid tagName:
@#[line:11,col:13]

C:\nativescript-projects\Hub\app\views\superadmin._superadmin.xml has syntax errors.
warning
attribute “��_�+��Ȗ” missed value!! “��_�+��Ȗ” instead!!
@#[line:1,col:279]
error
element parse error: Error: invalid attribute:��_�+��Ȗ
@#[line:1,col:279]
warning
attribute “4tK��” missed value!! “4tK��” instead!!
@#[line:1,col:411]
error
element parse error: Error: invalid attribute:4tK��
@#[line:1,col:411]


#2

May I bump this please? I honestly don’t understand this behaviour.


#3

Try copy/pasting into something like Notepad and then copy/paste from there into Visual Studio, this should remove any encoding on the characters.


#4

Yes I tried that and the problem still persists. Did you notice the filename in my original post ? login._login.xml… Is that correct ? Is that some TNS thing ? All I can see in that folder is the normal login.xml.


#5

Not sure what would cause that - do you have the code checked into source control somewhere or are you just copying it back and forth somehow? I would suggest getting it into source control so you can work on it from a Mac or Windows without a problem.


#6

Setting up a remote is not a problem even though my original copy was via USB stick.

Looking at this again, I realize the folder in which these corrupted files are supposed to be is the parent folder instead of each view’s respective folder. This is super strange as there are absolutely no files in the /views folder, just folder for each view.

Maybe someone from Telerik/Progress would be able to shed some light on this weird stuff?


#7

This really doesn’t sound like a NS issue to be honest. I’ve never had an issue working between my Mac and PC on the same project. It definitely sounds like a file corruption issue between the operating system.


#8

The files themselves show no corruption at all so I would be inclined to believe this has something to do with how NS works with the files.

Look at the path. Replace ._ with \ and you have a good path to the file.