diacritics

MacOSX: how to disable accented characters input

江枫思渺然 提交于 2019-12-17 18:33:59
问题 I'm using Eclipse Juno on MacOSX Lion and have an issue with typing. I often print one quote/apostrophe and move the caret. But in this Mac version of Eclipse the quote as I type is highlighted by orange marker (it seems like Mac smart quotes feature) and when I move caret - quote disappears. (in Xcode and Appcode everything works ok). I tried defaults write NSGlobalDomain AutomaticQuoteSubstitutionEnabled -bool false to disable smart qotes globally, restarted the computer, but this doesn't

Save Accents in MySQL Database

时间秒杀一切 提交于 2019-12-17 18:07:18
问题 I'm trying to save French accents in my database, but they aren't saved like they should in the DB. For example, a "é" is saved as "é". I've tried to set my files to "Unicode (utf-8)", the fields in the DB are "utf8_general_ci" as well as the DB itself. When I look at my data posted through AJAX with Firebug, I see the accent passed as "é", so it's correct. Thanks and let me know you need more info! 回答1: Personally I solved the same issue by adding after the MySQL connection code : mysql_set

Removing accents/diacritics from string while preserving other special chars (tried mb_chars.normalize and iconv)

假如想象 提交于 2019-12-17 16:20:03
问题 There is a very similar question already. One of the solutions uses code like this one: string.mb_chars.normalize(:kd).gsub(/[^x00-\x7F]/n, '').to_s Which works wonders, until you notice it also removes spaces, dots, dashes, and who knows what else. I'm not really sure how the first code works, but could it be made to strip only accents? Or at the very least be given a list of chars to preserve? My knowledge of regexps is small, but I tried (to no avail): /[^\-x00-\x7F]/n # So it would leave

Java string searching ignoring accents

£可爱£侵袭症+ 提交于 2019-12-17 06:35:17
问题 I am trying to write a filter function for my application that will take an input string and filter out all objects that don't match the given input in some way. The easiest way to do this would be to use String's contains method, i.e. just check if the object (the String variable in the object) contains the string specified in the filter, but this won't account for accents. The objects in question are basically Persons, and the strings I am trying to match are names. So for example if

Remove diacritical marks (ń ǹ ň ñ ṅ ņ ṇ ṋ ṉ ̈ ɲ ƞ ᶇ ɳ ȵ) from Unicode chars

末鹿安然 提交于 2019-12-16 20:02:02
问题 I am looking at an algorithm that can map between characters with diacritics (tilde, circumflex, caret, umlaut, caron) and their "simple" character. For example: ń ǹ ň ñ ṅ ņ ṇ ṋ ṉ ̈ ɲ ƞ ᶇ ɳ ȵ --> n á --> a ä --> a ấ --> a ṏ --> o Etc. I want to do this in Java, although I suspect it should be something Unicode-y and should be doable reasonably easily in any language. Purpose: to allow easily search for words with diacritical marks. For example, if I have a database of tennis players, and

Unique constraint on table column

房东的猫 提交于 2019-12-14 02:21:07
问题 I'm having a table (an existing table with data in it) and that table has a column UserName. I want this UserName to be unique. So I add a constraint like this: ALTER TABLE Users ADD CONSTRAINT [IX_UniqueUserUserName] UNIQUE NONCLUSTERED ([UserName]) Now I keep getting the Error that duplicate users exist in this table. But I have checked the database using the following query: SELECT COUNT(UserId) as NumberOfUsers, UserName FROM Users GROUP BY UserName, UserId ORDER BY UserName This results

Vim, word frequency function and French accents

筅森魡賤 提交于 2019-12-14 01:50:24
问题 I have recently discovered the Vim Tip n° 1531 (Word frequency statistics for a file). As suggested I put the following code in my .vimrc function! WordFrequency() range let all = split(join(getline(a:firstline, a:lastline)), '\A\+') let frequencies = {} for word in all let frequencies[word] = get(frequencies, word, 0) + 1 endfor new setlocal buftype=nofile bufhidden=hide noswapfile tabstop=20 for [key,value] in items(frequencies) call append('$', key."\t".value) endfor sort i endfunction

Combining diacritical marks like the comma above and acute accent with Latin base characters

时光怂恿深爱的人放手 提交于 2019-12-13 09:46:31
问题 I am developing a solution for MS Word (using VBA) and websites (using HTML/CSS/JS) enabling an efficient typing of character combinations that consist of multiple diacritical marks, such as œ̣̄̃́ , for example. A prototype solution has already been implemented, though I've stumbled across one single difficulty that I may not be able to solve without any support. I need to display these characters which consist of the 'combining comma above' (U+0313) and 'combining acute accent' (U+0301). The

ItextSharp - diacritic chars

假装没事ソ 提交于 2019-12-13 07:55:26
问题 i reading pdf documents via ItextSharp library. But these documents is in Czech language which use diacritic (ř ě ž š č etc.) How I can read this chars? Any idea? Or, is some solution for replacing this chars for normal r e z s c ? This is code in my method. Thanks PdfReader reader = new PdfReader("M:/ShareDirs_KSP/RDM_Debtors/DMS_PROD/" + src); // we can inspect the syntax of the imported page String text = new String(); for (int page = 1; page <= 1; page++) { text += PdfTextExtractor

RestAPI in Java with MySQL DB: issue on storing data with diacritics

一曲冷凌霜 提交于 2019-12-13 07:06:39
问题 I am building an app and I can't seem to handle the data that contain diacritics or other type of UTF-8 characters. In my case I'm in need of this chars: ă-Ă-â-Â-î-Î-ş-Ş-ţ-Ţ . Now, first, there is a input on the front-end that gathers some info from the users, sends it via AngularJS http module to the API. The headers are all good, the data goes to the API all good. Then, on the server side, if I log the info, it outputs: ?-?-â-Â-î-Î-?-?-?-? , and of course, the same info is put in the db