Character error (ñ not working)

Bugs that are actually features.
Pesinario
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Apr 02, 2017 9:10 am
Contact:

Character error (ñ not working)

Post by Pesinario »

Well, first of all, I want to say that this doesn't deserve a priority fix at all, buy I wanted to let the devs know anyway.
Also, forgive me if this was already reported, I searched as in every way I could think of about this issue but nothing showed up, if it is please delete this topic.
Doesn't matter whether it is or not a scenario or just a new game you can't name an save (Trains, Labs and everything else as far as I know works just fine) with an "ñ" character anywhere, doesn't matter if it is in the middle, beginning or end of the save name, again, not really an important issue but I just ran into it and I thought why not report it
Keep up the great work and hurry up with the 0.15 update! :mrgreen:
Images of the error:
pic
Loewchen
Global Moderator
Global Moderator
Posts: 9186
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Character error (ñ not working)

Post by Loewchen »

That ñ is not working is not a bug, savegame names can not contain non Latin letters, which is an OS limitation I assume. The error message should be more informative though I think.
Pesinario
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Apr 02, 2017 9:10 am
Contact:

Re: Character error (ñ not working)

Post by Pesinario »

Loewchen wrote:That ñ is not working is not a bug, savegame names can not contain non-Latin letters, which is an OS limitation I assume. The error message should be more informative though I think.
I run Windows 7 64 bits and a 64 bits version of Factorio, latest version if that makes a difference.
I don't know if it has anything to do but i can name things with ñ in my Windows OS.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14280
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Character error (ñ not working)

Post by Rseding91 »

Right now we only allow characters containing: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-. " - I don't exactly know why since as you said the filesystem allows the characters.
If you want to get ahold of me I'm almost always on Discord.
User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 870
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: Character error (ñ not working)

Post by mexmer »

Rseding91 wrote:Right now we only allow characters containing: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-. " - I don't exactly know why since as you said the filesystem allows the characters.
i can think of one reason, and that's called portability.
even in our modern age, not all systems supports UNICODE filenames, and nonascii characters translate differently depending on codepage of users OS.

while most modern FS and OS accept and can work with UNICODE filenames, it's rather hassle making detection and exception for any "irrelagularity" out there, so it's better to strip/not allow offending characters in filename.

similar case is with filename length. while you can theoretically have unlimited filename, still many OS apis have limitation to single path component depending on filesystem you use (it's 63 characters for NTFS 1 for example) and total path length (255 characters).

as for portability ... imagine you send your "šěečšěččěšřčěř-21.1.2017 14:53:13.zip" savefile from windows to mac user, would he be able to save it? not to mention open it?

well with latest OS X and assuming you running at least windows 7 and using some file sharing service for web for sharing your save, it will most likely get trough, but there is also possibility, it will not, because of different codepage sets.

btw. i used : in filename, which is invalid character on windows and macos X (if you use HFS, on HFS+ it's allowed, but older HFS uses : as path separator :D ), on unix is : allowed in filename tho' (unless it's rulled out by underlaying FS ruleset)
Phezz
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Apr 24, 2016 1:57 am
Contact:

Re: Character error (ñ not working)

Post by Phezz »

Rseding91 wrote:Right now we only allow characters containing: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-. " - I don't exactly know why since as you said the filesystem allows the characters.
It looks like this 'feature' broke AutoUpdates for me in 15.2.
Every time I start the game it asks me to login, then doesn't offer me an update.

My email address contains an ascii plus character '+' . This was working great all through v14. Now if I go to 'Other settings' I can't leave the screen because my username 'contains invalid characters'. My username hasn't changed since I bought the game. I'm rather adamant that Auto Updates work and this post is primarily about naming items in game, so I will post a new bug report specifically limited to the 'Factorio username' field's incorrect character limitations.

For reference email RFC 3696 explains specifically what a valid email address can be:
https://tools.ietf.org/html/rfc3696#section-3

EDIT: I got AutoUpdate to work by clicking 'login' on the 'Other settings' menu. The modal dialog asked for my username and password, didn't complain about my ascii plus sign, then wrote 'phezzan' into the username box of the "Other settings" screen. This worked great.
Something about upgrading to v15 ended up placing my login username in that box instead.
User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 870
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: Character error (ñ not working)

Post by mexmer »

just note, your problem with login should not be related to saves, seems different issue.
anyway for me still works (even after upgrade), using my login name, i don't need to use email address for update login.

you need to have either you username (from main website page), or email bound to your username in "other settings" dialog, both works for me, but i prefer using username, looks better in multiplayer :D
Harkonnen
Fast Inserter
Fast Inserter
Posts: 207
Joined: Fri Sep 02, 2016 9:23 am
Contact:

Re: Character error (ñ not working)

Post by Harkonnen »

One frequent problem with updates is that first 0.15.x update resets config, and particularly resets 'enable experimental updates' checkbox which renders further 0.15.x invisible to you.
BenSeidel
Filter Inserter
Filter Inserter
Posts: 590
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Character error (ñ not working)

Post by BenSeidel »

mexmer wrote:i can think of one reason, and that's called portability.
Throwing out everything that is not acceptable on all systems is a really poor excuse, especially when you already have to write file handling code per operating system anyway. From your logic I would not be able to right-click on anything because Mac's only have the one button, nor would I be able to run in Directx on Windows.
mexmer wrote:as for portability ... imagine you send your "šěečšěččěšřčěř-21.1.2017 14:53:13.zip" savefile from windows to mac user, would he be able to save it? not to mention open it?
It happens all the time. The names of files that can be in an email message have nothing to do with the name you save it to in your system. Does your email client not give you a "Save as..." option for your attachments?

As to why you should only be able to use specific characters, because it's more secure.
If you don't limit your character set to a "minimal safe subset" of usable characters then you open up your system to new and exciting attacks, similar to SQL injection attacks. If one character has some other meaning, say the % character in Windows, and you forget to disallow it, your application can be an entry point for some nasty activity if the system does not have adequate security settings.
Post Reply

Return to “Not a bug”