invalid character '_' in Bundle Identifier - xcode

Build warning:
invalid character '_' in Bundle Identifier at column 17. This string must be a uniform type identifier (UTI) that contains only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters.
This warning is occurring when building a 3rd party framework that we cannot modify. Is there a way to make Xcode (5.0.2) suppress the warning?
Note: this app will not be going into the App Store.
Thanks!

Bundle Identifier present in plist should contain only alphanumeric (A-Z,a-z,0-9), hypen (-), and period (.) characters. You cannot add characters other than specified. Hence, prompting an warning.
Now, remove underscore ( _ ) character from Bundle Identifier to suppress warning.

Related

Does Go have file name restrictions?

I created a file with square brackets called [id].go but I am unable to build it.
When I run go build "[id].go", I see the the following:
can't load package: package main: invalid input file name "[id].go"
Are there restrictions on Go file names? Specifically, what is not allowed? Please provide documentation if any.
At the time of writing, Go files must begin with one of the following:
0 through 9
a through z
A through Z
. (period)
_ (underscore)
/ (forward slash)
>= utf8.RuneSelf (char 0x80 or higher)
Two or more files in the same folder can't be named equal (case insensitive match)
https://github.com/golang/go/blob/993ec7f6cdaeb38b88091f42d6369d408dcb894b/src/cmd/go/internal/load/pkg.go#L1826-L1835
To be conservative, we reject almost any arg beginning with non-alphanumeric ASCII.
As an example if you try a[id].go as the file name you should be good to go.

not able to export certain variables and get 'not a valid identifier'

I am on ubuntu 16.x and getting this below error. how to get around?
export machineType-argo="c1.medium"
-bash: export: `machineType-argo=c1.medium': not a valid identifier
Bash variable names can contain latin letters, digits and underscores (_). Hyphens (-) are not allowed, that's why you get this error.
Prooflink:
name A word consisting solely of letters, numbers, and underscores,
and beginning with a letter or underscore. Names are used as shell
variable and function names. Also referred to as an identifier.

":"-Character in a windows filesystem (formerly: ":"-Character in Delphi TFileStream)

I tried to put a colon in the String of the filename of a filestream.
Is it true that one can't use a colon in a TFileStream in Delphi?
And if you can, then how?
EDIT: Thanks for all the downvotes. It deserves that. In retrospekt I have asked a stupid question...
On Windows, which I presume is your platform, the colon is a reserved character and so not allowed in a filename. This is documented here:
File and Directory Names
Naming Conventions
The following fundamental rules enable applications to create and process valid names for files and directories, regardless of the file system:
...
Use any character in the current code page for a name, including Unicode characters and characters in the extended character set (128–255), except for the following:
The following reserved characters:
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
...

Special Character in windows file name

why we can not use any special character (?, <..) in windows File name ?
Fundamental rules for for Universal Naming Convention (UNC),which enable applications to create and process valid names for files and directories, regardless of the file system:
Following reserved characters:
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
Use any character in the current code page for a name, including Unicode characters and characters in the extended character set (128–255),
Because they have special meanings in filesystem:
C:*.? - get all files with single letter extensions from C drive
: \ * ? - all have special meanings
Since some character are Reserved characters in some operating system,say ? is used as wildcard,/ as path name component separator.

Recognizing extended characters using JAVACC

I'm creating a grammar using JavaCC and have run across a small problem. I'm trying to allow for any valid character within the ASCII extended set to be recognized by the resulting compiler. After looking at the same JavaCC examples (primarily the example showing the JavaCC Grammer itself) I set up the following token to recognize my characters:
< CHARACTER:
( (~["'"," ","\\","\n","\r"])
| ("\\"
( ["n","t","b","r","f","\\","'","\""]
| ["0"-"7"] ( ["0"-"7"] )?
| ["0"-"3"] ["0"-"7"] ["0"-"7"]
)
)
)
>
If I'm understanding this correctly it should be matching on the octal representation of all of the ASCII characters, from 0-377 (which covers all 256 characters in the Extended ASCII Set). This performs as expected for all keyboard characters (a-z, 0-9, ?,./ etc) and even for most special characters (© , ¬ ®).
However, whenever I attempt to parse the 'trademark' symbol (™) my parser continually throws an End of File exception, indicating that it is unable to recognize the symbol. Is there some obvious way that I can enhance my definition of a character to allow the trademark symbol to be accepted?
I had similar a issue for recognizing special symbols of a text file (either CP1252 or ISO-8859-1 encoded) which was read to a String before parsing. My solution was adding the UNICODE_INPUT to the grammar header:
options {
UNICODE_INPUT=true;
}
Worked like a breeze.
More information on JavaCC options: http://javacc.java.net/doc/javaccgrm.html
It turns out that what I wanted my grammar to do was to accept all valid Unicode characters and not ASCII characters, the ™ symbol is part of the Unicode specification and not in an ASCII extended character set. Changing my token for a valid character as outlined below solved my problem: (A valid unicode being of the format- U+00FF)
< CHARACTER:( (~["'"," ","\\","\n","\r"])
| ("\\"
( ["n","t","b","r","f","\\","'","\""]
| ["u","U"]["+"]["0"-"9","a"-"f","A"-"F"]["0"-"9","a"-"f","A"-"F"]["0"-"9","a"-"f","A"-"F"]["0"-"9","a"-"f","A"-"F"]
)
) )>

Resources