Non-Alphanumeric Character in a String
I understand if we have a non-alphanumeric character in a String, we have to put a backward slash in front of that character. For example, we have to put a backward slach in front of a "backward slash". Eg. we do \\ to put a backward slash in a String.
What about a dot (.) or a dash (-)? Do we have to do the same thing?
No, it's only for control characters like "newline", characters with special meaning in strings i.e. " and \ and any character that can't be represented in the character encoding of your java source file.
Similar Messages
-
How to discard non alphanumeric key in a string ?
Dear all,
To start an application that i have developped, i would like that the user write its password in the first panel but i want that each time that user enter a character in the string control Hide_Password (see attached picture), this one is automatically convert in a "." to hide the password . The real password is saved in a second string control. It is actually what my vi is doing by using a Key Up event. But now i want to prevent any non alphanumerical character to be enter in the password, especially i do not want that the user can press the menu key as <Ctrl>, <Shift>, <Alt>, <Command>, and <Option> and also the <Left>, <Up>, <Right>, <Down>. I suppose that i have to use Key Down? event by discarding all the key that i do not want but i am sure that there is a more easy way to do it.
Do you have any idea ?
Morover, If you think that there is something wrong in my vi, please let me know.
Thanks
Philippe
Solved!
Go to Solution.
Attachments:
FrontPanel.png 12 KB
BlockDiagram.png 43 KBThe real password is saved in a second string control.
One thing you shouldn't do is use a (hidden?) String control for data storage. Use the one control for data input (as a password as others have suggested) and pass the data throughout your program with a wire.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice -
Non-hex character in hex string
I'm getting this messsage when I try to open an Illustrator file:
"Acrobat PDF file format is having difficulties. Non-hex character in a string."
I', using illustrator CS6 and I need my file opened..!Nobody can know without seeing the file and having more info about your system. Does the file open in Acroibat/ Adobe Reader for instance?
Mylenium -
Non-hex character in hex string after upgrade to Yosemite
Hi,
When I try to open some of my files I get an error: "Acrobat PDF File Format is having difficulties. Non-hex character in a hex string". I could open the files before.
The only thing I've done since I opened the file last was to upgrade to Yosemite. The error occurs on both my Mac Pro (late 2013) and Mac Book Pro with Yosemite. Unfortunately, I have no access to a Mac with Mavericks and CS6 but I will try to fix one to verify that the file works there.
Affected files (Created in Illustrator CS6 on Mavericks):
services.ai
visual guidelines v.0.4.pdf
visual guidelines.ai
Tested steps:
Open previous versions of the same file from our repository
Update Illustrator CS6 to latest version
Download Illustrator CC
Tried to Place the file into another file (same error)
Tried to repair file Enable content recovery mode | Illustrator CS2-CS5Hi svepdesigncenter,
How you are accessing those files from your repository?
There might be chances of getting files corrupted when transferring.
File may have been sent as ascii when it should have been sent as binary or vice versa.
In 99% of transfers it's ALWAYS safest to zip an AI or eps file before sending it anywhere.
Regards,
Sumit Singh -
Find a non-numeric character in a string
I have a 3 strings (1) 'AB99CDEFGH0012%' (2) 'ABCDEFGH' (3) 'ABCD11'
how do i find out a that string has non numeric characters
ThanksSELECT TO_NUMBER(:String) FROM DUAL;
is a quick way to find out :)
A good method would be.....
SELECT 1 FROM DUAL WHERE TRANSLATE(:String, 1234567890, '-') IS NOT NULL;
The statement will filter out ALL numbers, leaving behind any characters, A, B, @, ~, etc... -
Sqlloader -350 illegal combination of non alphanumeric character
hi all,
i'm using owb 10.2.0.1
i have a file in my D:\2122008.txt and a table in oracle DB
created a map from file to table.....
generated a code and saved in D:\orahome_1\owb\codegen\ctl\Employee.ctl
deployed in target database...
when is start from OWB i get the following error
RPE-01013: SQL Loader reported error condition, number 1.
SQL*Loader: Release 10.2.0.1.0 - Production on Thu Mar 6 17:50:01 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL*Loader-500: Unable to open file (d:\EMPLOYEE.ctl)
SQL*Loader-553: file not found
SQL*Loader-509: System error: The system cannot find the file specified.
so i planned to run by invoking sql*loader..
this is the generated code
OPTIONS (BINDSIZE=50000,ERRORS=50,ROWS=200,DIRECT=TRUE,READSIZE=65536,FILE='F_21022008_TXT')
CONTINUE_LOAD DATA
CHARACTERSET WE8MSWIN1252
INFILE '{{FILE_EMP_LOCATION1.RootPath}}{{}}21022008_TXT'
DISCARDMAX 0
CONCATENATE 1
INTO TABLE "DMT_ADMIN"."AZBJ_ONEEMPLOYEE_DATABASE"@"dwhtest"
APPEND
REENABLE DISABLED_CONSTRAINTS
FIELDS TERMINATED BY X'09' OPTIONALLY ENCLOSED BY 'X' SKIP 0
"REC_SRNO" POSITION(1) INTEGER EXTERNAL ,
"EMPLOYEENUMBER" INTEGER EXTERNAL ,
"EMPLOYEENAME" CHAR ,
"EMPDOB" CHAR ,
"GENDER" CHAR ,
"DEPARTMENT" CHAR ,
"DESIGNATION" CHAR ,
"OPUSCODE" CHAR ,
"BRANCHCODE" CHAR ,
"OFFICEMAIL" CHAR ,
when i execute in sqlldr it is openeing the ctl file but gives the following error
sql*loader-350: syntax error at line 21
illegal combination of non-alphanumeric characters
INTO TABLE "DMT_ADMIN"."AZBJ_ONEEMPLOYEE_DATABASE"@"dwhtest"
the error is comming at the symbal "@"
tried out several ways but could'nt resolve the prob
anyone out there to help me....shld i need to keep the source files where OWB server is installed or can i run the process by keeping the files in my client systems local directory?
-
Identify Non English Character in a String
All,
We have a requirement to Identify the Non English Characters from the User Key In data and return an error message saying only valid English, Numeric and some special characters are allowed.
For Example, If the User enters data like "This is a Test data" then the return value should be true. or if he enters something like "My Native Language is inglés" then it should return false. Similarly any Chinese, russian or japansese character entryies should also return false.
How can we achieve this?
Thanks,
Nagarajan.Hi Nagarajan,
You could use Unicode character blocks or simply craft a regular expression that contains all the characters you need. The latter is easy to understand and gives you full control over which characters you want to allow. E.g. I assume you might want something like this:
if(!"This is a proper input string".matches("[\\s\\w\\p{Punct}]+")) {
// Issue error message and re-get input string
The String method matches() takes a regular expression as input parameter. If you haven't dealt with regular expressions before, check out the Java API help for class java.util.regex.Pattern. Here's a short breakdown of the pattern I used:
<ol>
<li>The square brackets [] enclose a list of allowed characters; here you can explicitly list all allowed characters.</li>
<li>You can specify ranges like a-z as a character class, list individual characters like ;:| or utilize predefined character classes (\s for any whitespace character, \w for all letters a-z and A-Z, underscore and 0-9 and the posix class \p for a list of punctuation symbols). For a complete list check Java API help on java.util.regex.Pattern.
<li>The + at the end indicates that the characters listed can occur once or more.</li>
</ol>
There's other ways to achieve what you want, but I think this might be an easy way to start with.
Cheers, harald -
ALPHANUM datatype contains non-alphanumeric character like @#$&*
Hi All,
I use ALPHANUM datatype in one table with 127 size. As per definition in Developer guide
"ALPHANUM(n) data type specifies a variable-length character string which contains alphanumeric characters"
Example :
insert into "SOMNATH"."aadata" values(to_ALPHANUM ('!@#$%')) ;
insert into "SOMNATH"."aadata" values(')(*&!@#$%') ;
Above statement executed successfully. So HANA cannot check alphanumeric char. at the time of insertion or any other reason?
Message was edited by: Tom FlanaganHmm... not sure about PASAL ... never heard of that one and it doesn't pop up in my search engine of choice.
But as you describe it, it seems to be a standard/convention on how to name your variables.
Limiting what type of characters can be entered into the system definitively limits the portability of your application. Something that might not be relevant today, but very likely tomorrow...
Take the user name in SAP HANA for an example. With SPS8 our development finally made the move to allow NVARCHAR characters as user names - allowing chinese, indian, thai, israeli ... users to choose names for user accounts in the alphabet that is right for them.
Concerning processing and memory consumption: I don't really see the point in bringing up a link to a MS SQL Server blog here.
MS SQL Server encodes data very differently from SAP HANA. And Oracle stores data differently than IBM DB 2 and mySQL stores data differently than PostgreSQL ....
What I can say is: as long as you don't put in "international" characters into a NVARCHAR column, memory and processing requirements are the same as for VARCHAR.
It's easy to try out.
So, using the VARCHAR instead of NVARCHAR only limits the application but won't save a lot of resources (as long as you don't actually use the extended character set)
- Lars -
Php / mysql replace non-ascii character in a string
I have a script that converts a ms word document to text then
uploads that to a blob field on a mysql db.
During the conversion some characters my not be recognised.
When i then call up the blob for display on the browser...those
characters show up as unknown characters with a ? or box. Is there
a way to preg_replace those unknown characters before displaying
them.
thanks
ian.oO(surfinIan)
>I have a script that converts a ms word document to text
then uploads that to a
>blob field on a mysql db.
> During the conversion some characters my not be
recognised. When i then call
>up the blob for display on the browser...those characters
show up as unknown
>characters with a ? or box. Is there a way to
preg_replace those unknown
>characters before displaying them.
What about fixing the encoding problem instead? If chars get
lost during
such a transfer
document->script->database->script->browser it's always
an encoding problem somewhere down the road.
The recommendation these days is to use UTF-8, which avoids
most of
these old problems. You just have to make sure that your
documents are
properly stored as UTF-8 in the database and delivered as
such to the
script and the browser, then you don't have to worry about
special chars
anymore.
That's just the general idea. I can't be more specific, since
I don't
know your conversion script or the database structure.
Micha -
Insert set of character in a string
hi guys,
I have created a string of length 19, i need to insert set of character and compare them if its right format or not.That is for barcode i need. i WANT MY PROGRAM TO GENERATE THIS FORMAT BARCODE.
eg : INV40602007RE000155Hi
SEARCH
Variants:
1. SEARCH f FOR g.
2. SEARCH itab FOR g.
Note
Like all string processsing statements, you can only use character-type operands here.
If the type of an operand is not STRING, the operand is treated like a type C field, regardless of its actual type, even though no actual conversion takes place.
See Only character fields allowed in string processing.
Variant 1
SEARCH f FOR g.
Additions:
1. ... ABBREVIATED
2. ... STARTING AT n1
3. ... ENDING AT n2
4. ... AND MARK
Effect
Searches the contents of f for the string in the field g. This string can have any of the following formats:
'str'
a character string (trailing spaces are ignored)
'.str.'
any character string between the periods
'*str'
a word ending with "str", including "str"
'str*'
a word beginning with "str", including "str"
You can use any non-alphanumeric character as a separator, that is, spaces, punctuation marks and non-printable characters.
Note
The search patterns 'str' and '.str.' are identical apart from a few exceptions. You must use '.str.' when the pattern str contains spaces (at the end), the '.' character (at the beginning and end), or the '*' character (at the end). You should also use '.str.' when the contents of the search string str is a variable, since you cannot predict when you write the statement what the contents of the string will be.
The system does not distinguish between upper and lower case characters.
The return code is set as follows:
SY-SUBRC = 0:
The search string g was found in the field f. SY-FDPOS contains the offset of the found string or the found word within the field.
SY-SUBRC = 4:
The search string g was not found in the field f.
Addition 1
... ABBREVIATED
Effect
Searches the field f for a word containing the character string specified in the field. Here, the characters specified in g may be separated by other characters in the word. If the string g occurs in a word, the return code in system field SY-SUBRC is set to 0. The first letter of the search string g and of the word must match.
Example
DATA F(50).
MOVE 'Alaska Texas California' TO F.
SEARCH F FOR 'Clfrn' ABBREVIATED.
Here, SY-SUBRC is set to 0, since not only does the string 'Clfrn' occur (separated by other characters) in 'California', but 'Clfrn' and 'California' begin with the same letter.
Addition 2
... STARTING AT n1
Effect
Searches the field f starting from the position n1. Here, n1 can also be a field containing the corresponding value. The first character in the field f is in position 1.
When you use the addition STARTING AT, the position specified for the found pattern in SY-FDPOS does not refer to the start of the field, but to the position n1.
Addition 3
... ENDING AT n2
Effect
Searches the field f up to the position n2.
Addition 4
... AND MARK
Effect
If the search string g is found, all the characters of the search string and all the characters occurring in between (in the case of SEARCH ABBREVIATED) are converted to upper case in the field f.
Example
DATA F(20) VALUE 'Peter Paul Mary'.
SEARCH F FOR '*UL' AND MARK.
SY-SUBRC is now set to 0, since the search string was found in 'Paul'. SY-FDPOS has the value 6, since the character string found starts at the offset 6. Also, the search string is marked, so that the new contents of f are as follows:
'Peter PAUL Mary'
Variant 2
SEARCH itab FOR g.
Additions:
1. ... ABBREVIATED
2. ... STARTING AT line1
3. ... ENDING AT line2
4. ... AND MARK
Effect
Searches the internal table itab for the string in field g. The string can have the same format as in variant 1. The value of SY-SUBRC is set to 0, if the search string is found in the table. The system field SY-TABIX then contains the number of the table line where the string was found. Meanwhile, SY-FDPOS specifies the offset of the found string within the table line.
Note
The statement does not search the header line of an internal table itab.
Addition 1
... ABBREVIATED
Effect
As with SEARCH ABBREVIATED, searches the internal table itab for a word that contains the character string specified in the field g. Here, the characters specified in g can be separated by other characters in the word. The return code value of the system field SY-SUBRC is set to 0, if the string g occurs in a word. The first letter of the search string g and of the word must match.
Addition 2
... STARTING AT line1
Effect
Searches the internal table itab starting from line line1 to the end. line1 can be a field that contains the corresponding values.
Addition 3
... ENDING AT line2
Effect
Searches the internal table itab up to the line line2.
Addition 4
... AND MARK
Effect
If the search string g is found, all the characters of that search string and all the characters occurring in between (in the case of SEARCH ABBREVIATED) are converted to upper case in the internal table itab.
Example
Let T be an internal table which is empty:
TYPES: BEGIN OF T_TYPE,
LINE(80),
END OF T_TYPE.
DATA: T TYPE STANDARD TABLE OF T_TYPE WITH
NON-UNIQUE DEFAULT KEY,
WA_T TYPE T_TYPE.
MOVE 'Alaska Texas ' TO WA_T.
APPEND WA_T TO T.
MOVE 'California Arizona ' TO WA_T.
APPEND WA_T TO T.
SEARCH T FOR '*ONA' AND MARK.
SY-SUBRC is now set to 0 because the search string was found in 'Arizona'. SY-TABIX contains the value 2 because 'Arizona' appears in the second line of the table T. SY-FDPOS is set to 11 because the found character string begins at the offset 11. Also, the search string was marked in the second line in such a way that the contents of that line now look as follows:
'California ARIZONA'
Note
Performance:
Searching generically for a string in an internal table is much more runtime-intensive (approx. 5000 msn (standardized microseconds)) than searching for 'str' (approx. 20 msn). This was measured using a table with 200 entries and 10 fields.
If you perform a search in a field which is 50 bytes long for 'str' or 'str', the runtime consumption is approx. 300 msn, whereas searching for 'str' takes about 15 msn.
Regards,
Raghav -
PHP: automatically replace alphanumeric characters in a string
Quick question:
How do I program a PHP script to replace all non-alphanumeric
charters within a string, with underscores?.oO(AngryCloud)
>Yes, this does help, although it is only alphabetic.
>
>Will changing the line to this make it alphanumeric?:
>
>$new_string = preg_replace("/[^a-zA-Z0-9]/", "_",
$string);
Did you try it? ;-)
You could also use this shorter pattern:
/[^a-z\d]/i
Should be the same (\d matches decimals and the /i modifier
makes the
entire thing case-insensitive).
Micha -
Hot to set the Non-alphanumeric characters attribute?
Hello,
I'm developing an asp.net application using the oracle membership provider. I have installed the databse objects in an Oracle 9i and when I try to create a new user, It always asks me to consider at least 1 Non-alphanumeric character in the password, even if I put in the web.config file the minRequiredNonalphanumericCharacters="0" attribute. Is there another way to set the Non-alphanumeric characters to "0".
Thanks.Workaround: set 0 for minRequiredNonalphanumericCharacters attribute in your machine.config for OracleMembershipProvider. The defalt value is 1. The typical location of machine.config is in %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG.
-
Replace Non-Numeric Characters with a Numeric Character in a String
Hi Guys,
I need to replace all the non-numeric characters (including embedded blanks & hyphen) in a string to a numeric character '1'.
The trailing blanks should not be replaced.
e.g. "P22233344455566" should be changed to "122233344455566"
& "49-1234567 " should be changed to "4911234567 "
Please help.Use [replace|http://help.sap.com/abapdocu_70/en/ABAPREPLACE_IN_PATTERN.htm] with a regular expression to translate any non-numeric character (i.e. any character not between 0 and 9) to 1:
REPLACE ALL OCCURENCES OF REGEX '[^0-9]' IN value WITH '1'.
Cheers, harald
p.s.: In older releases [translate|http://help.sap.com/abapdocu_70/en/ABAPTRANSLATE.htm] would also do the trick, but is more lengthy, because one would need to specify each individual character that should be replaced, e.g.:
TRANSLATE value TO UPPER CASE.
TRANSLATE value USING
' 1_1-1a1b1c1d1e1f1g1h1i1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1'. -
Non-hex character in a hex string error message
Hi everyone,
I encountered n error message in Illustrator "Acrobat PDF File Format is having difficulties. Non-hex character in a hex string." when trying to open a particular file.
File was originally created on a Windows 7 PC, tried opening file on Mac OS 10.7.5, same Illustrator version 18. Also tried opening in PDF, Distiller, but didn't help.
Did tried to change Illustrator Preferences in both Windows and Mac, following the steps in the TecNote:
http://kb2.adobe.com/cps/500/cpsid_50031.html
When trying to open the file from the File > Open menu, with the keys held down, it did not open a blank file window, neither did it created a duplicate copy in the Finder where the file is located.
The file in question had about 15 artboards, a few embedded images, approx 2.6MB size.
Any suggestions/assistance would be greatly appreciated.
Thank you.Hi Monika,
The file was .ai file, as mentioned earlier, was created in Illustrator ver 18.
Not emailed, stored in the folder, on the Windows PC, not a server. Last saved few days ago, tried to reopen the file from the same computer, but could no longer opened.
No, Illustrator did not crash, just the error message "Acrobat PDF File Format is having difficulties. Non-hex character in a hex string." -
Non-hex character in a hex string
My Illustrator file will not open in Illustrator and I get the "non-hex character in a hex string" window whenever I try to open it. It does open in Acrobat but nothing else. I can't even save it as a pdf file..
Is there any way I can get around that or fix it?karam,
The first thing to try is to use File>Place in a new document and see how much, if anything, is saved this way.
The next thing to try is to repair the file code, which is more difficult. The basics are told in this TechNote, the actual recovery consists of changing/adding/deleting code.
http://kb2.adobe.com/cps/500/cpsid_50031.html
Maybe you are looking for
-
I cannot find it anywhere. I want to download Logic on multiple computers in my house by only buying it once on the app store. Is this possible?
-
Can't update to 10.5 on Windows XP
Trying to update to iTunes on Windows XP and get this message: C:\DOCUME~1\Doreen\LOCALS~1\Temp\iTunesSetup-3.exe could not be opened, because an unknown error occurred. Try saving to disk first and then opening the file.
-
Select LONG column into CLOB variable
Hi all, I am trying retrieve the data present in a LONG column into a CLOB variable. However I am getting an error, pls let me know how I can resolve it. DECLARE v_text CLOB; BEGIN SELECT TO_LOB(trigger_body) INTO v_text FROM user_triggers WHERE ROWN
-
Hello everyone, I am not that comfortable with binary file reading. I am trying to learn. I have a vi which logs a sine wave in a binary file. The Read vi which I have written is not giving the expected data. Thanks in advance cooldude Attachments:
-
Edit existing or add new record based on key field
Greetings and Salutations! I am working on an APEX 3.0 application and I need to verify a key field value to determine if the record already exists, if it does not exist, I need to add it, if it does exist, I need to update/edit it. I'm not sure how