character

Non latin symbols in url, php

不羁岁月 提交于 2020-01-05 08:35:23
问题 If use in url, non allowed character, for example space: <a href="pa ge.php">link</a> and click this link, in browser addres bar I see mysite.com/pa%20ge okay, and if now I use georgian, (or for example russian) alphabet symbols: <a href="აბცდ.php">link</a> In in browser addres bar, I see mysite/აბცდ.php that is, these non latine alphabet symbols, are not changed, tey are in url "presented" as original view. question: Why? non latine alphabet symbols are also allowed in url ? 回答1: No, a URL

What MySQL collation/character set should I use for English and Spanish?

余生长醉 提交于 2020-01-05 07:49:09
问题 I'm building an PHP5 application with MySQL for English and Spanish speaking. Should I set the character set and collation to UTF8 and then convert everything into the database with mbstring? Or, should I use some kind of latin character set that supports both English and Spanish? The application is strictly US only and it doesn't need to support the full international range of languages. I'm using CodeIgniter on most projects. I just noticed the CI Database settings. $db['default']['char_set

keep last few characters in listbox VB.NET

时光毁灭记忆、已成空白 提交于 2020-01-04 10:38:43
问题 I am trying to load a .txt file into a richtextbox (Point_BOX), then delete all but the last 5 characters into a listbox (Point_LIST). I've searched online and so far the only way I can get it to work is by removing the first 75 characters from the line (the lines in the .txt file should be 80 characters but sometimes is more/less). Point_BOX.Clear() Point_LIST.Items.Clear() OpenPointDialog.ShowDialog() FileName = OpenPointDialog.FileName Dim sr As IO.StreamReader = IO.File.OpenText(FileName)

Batch File to read 'N' characters from a text file

你。 提交于 2020-01-04 06:14:54
问题 I have searched this across the net and found many codes for retrieving the entire line from a text or replacing the text with another but not for what i was looking for. Using the For loop with the tokens would return on the set (word) separated with spaces. I want to pull only a few characters from the line. Eg: 12345qwerty67890 If this on in a text file i want to pull only '12345' and assign it to a variable. Any help is greatly appreciated. 回答1: set HELP SET and try the following to get

sed substitute whitespace for dash only between specific character patterns

笑着哭i 提交于 2020-01-04 05:27:10
问题 I have a lines like these: ORIGINAL sometext1 sometext2 word:A12 B34 C56 sometext3 sometext4 sometext5 sometext6 word:A123 B45 C67 sometext7 sometext8 sometext9 sometext10 anotherword:(someword1 someword2 someword3) sometext11 sometext12 EDITED asdjfkklj lkdsjfic kdiw:A12 B34 C56 lksjdfioe sldkjflkjd lknal niewoc kdiw:A123 B45 C678 oknes lkwid cnqule nkdal anotherword:(kdlklks inlqok mncvmnx) unqieo lksdnf Desired output: asdjfkklj lkdsjfic kdiw:A12-B34-C56 lksjdfioe sldkjflkjd lknal niewoc

Style half of a word, sentence, etc

强颜欢笑 提交于 2020-01-03 17:32:24
问题 I'd like to show a title with the first three characters in different color. I know this can be done with <h2><span>The</span> awsome title</h2> but I was wondering if there is some kind of "nth-child" property that can be applied to characters inside an element. I'd like to avoid breaking the text by inserting other elements ( etc.) A (relatively) crossbrowser solution would be welcome. 回答1: Yep, JavaScript is the only way I can think of (as everyone else has already said!). Demo here. $

How to detect and replace non-printable characters in a string using Java?

空扰寡人 提交于 2020-01-03 13:57:22
问题 For instance I have a string like this : abc123[*]xyz[#]098[~]f9e [*] , [#] and [~] represents 3 different non-printable characters. How can I replace them with "X" in Java ? Frank 回答1: I'm not sure if I understand your questions. If you can formulate it better, I think a simple regular expression replacement may be all that you need. String r = s.replaceAll(REGEX, "X"); REGEX depends on what you need: "\\*|#|~" : matches only '*', "#', and '~' "[^\\d\\w]" : matches anything that is neither a

Send special character with SendKeys

你。 提交于 2020-01-03 07:26:42
问题 I am using textboxes to send text via SendKeys, but when I insert special characters in the textbox, my application crashes. For example, when I put in a '+' in the textbox, I get this error: SendKeys string '+' is not valid. I need a solution to send special characters with SendKeys, this is a part of my code: SendKeys.Send(dropDownEffectsLeft1.SelectedItem.ToString() + dropDownEffectsRight1.SelectedItem.ToString() + txt1.Text); It's all about the textbox called txt1 I think I need something

Can we have a language other than english in a URL?

半世苍凉 提交于 2020-01-02 08:05:15
问题 I know the answer to my question is Yes, But I am really interested to know how its done with my application in PHP. I am basically looking for a URL that contains a hindi characters. Thanks, 回答1: Unfortunatly, RFC2396 says you're not allowed to use any non alphanumeric characters. You can however encode them, but that defeats your point of having nicely 'speaking urls'. 回答2: ICANN (The Internet Corporation for Assigned Names and Numbers) exists with the sole responsibility of managing top

using javascript, how can I count a mix of asian characters and english words

五迷三道 提交于 2020-01-02 03:58:06
问题 I need to take a string of mixed Asian characters (for now, assume only Chinese kanji or Japanese kanji/hiragana/katakana) and "Alphanumeric" (i.e., Enlgish, French), and count it in the following way: 1) count each Asian CHARACTER as 1; 2) count each Alphanumeric WORD as 1; a few examples: 株式会社myCompany = 4 chars + 1 word = 5 total 株式会社マイコ = 7 chars my only idea so far is to use: var wordArray=val.split(/\w+/); and then check each element to see if its contents are alphanumeric (so count as