diacritics

How to generate javadoc documentation with umlauts?

亡梦爱人 提交于 2019-12-02 17:05:00
I am trying to generate Java documentation in Eclipse. The source files are UTF-8 encoded and contain some umlauts . The resulting HTML files do not specify an encoding and do not use HTML entities, so the umlauts aren't displayed correctly in any browser. What can I do to change this? robinr See the -charset , -encoding and -docencoding flags for the javadoc command . -encoding specifies the input encoding -docencoding specifies the output encoding -charset makes javadoc include a meta tag with encoding info FeelGood Modified from Eclipse javadoc in utf-8 : Project -> Generate Javadoc -> Next

How to make matcher ignore diacritics - JQUERY

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 16:08:09
问题 I am trying to make Typeahead to work with accents. So far, no cigar. The file typeahead.json contains data like: {"0":"João","1":"Rogério","2":"Fábio"} The JQuery code looks like this: $.getJSON('./banco/typeahead.json',function(data){ var substringMatcher=function(strs){ return function findMatches(q,cb){ var matches, substrRegex; matches=[]; substrRegex=new RegExp(q,'i'); $.each(strs,function(i, str){ if(substrRegex.test(str)){ matches.push({value: str}); } }); cb(matches); }; }; var

simpleXML and accented characters in PHP

自古美人都是妖i 提交于 2019-12-02 04:20:24
问题 I have written an XML file which is using the ISO-8859-15 encoding and most of the data within the feed is ran through htmlspecialchars(). I am then using simplyxml_load_string() to retrieve the contents of the XML file to use in my script. However, if I have any special characters (ie: é á ó) it comes out as "é á ó". The How can I get my script to display the proper special accented characters? 回答1: You’re probably using a different character encoding for you output than the XML data is

Replace characters with multi-character strings

守給你的承諾、 提交于 2019-12-02 00:04:34
问题 I am trying to replace German and Dutch umlauts such as ä , ü , or ß . They should be written like ae instead of ä . So I can't simply translate one char with another. Is there a more elegant way to do that? Actually it looks like that (not completed yet): SELECT addr, REPLACE (REPLACE(addr, 'ü','ue'),'ß','ss') FROM search; On my way trying different commands I got another problem: When I searched for Ü I got this: ERROR: invalid byte sequence for encoding "UTF8": 0xdc27 Tried it with U&'

accent ajax encoding issue

吃可爱长大的小学妹 提交于 2019-12-01 23:59:55
Source file has: header('Content-type: text/html; charset=iso8859-1'); Source ajax (jQuery) script is: $(document).ready(function() { $.ajaxSetup({ cache: false }); $("#searchfield").keyup(function(){ $("#insert_search") .load('ajax/searchobjects.php', {search_word: $("#searchfield").val()}, function(){ }); }); }); Destination file: header('Content-type: text/html; charset=iso8859-1'); echo $_POST['search_word']; Data sent: é Result is: é All files: Western (ISO Latin 1) (using TextWrangler) Funny thing: I can insert records into MySQL just fine with accents. This is because you are

Detecting words that start with an accented uppercase using regular expressions

夙愿已清 提交于 2019-12-01 21:10:33
I want to extract the words that begin with a capital — including accented capitals — using regular expressions in Java. This is my conditional for words beginning with capital A through Z: if (link.text().matches("^[A-Z].+") == true) But I also want words that begin with an accented uppercase character, too. Do you have any ideas? Start with http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html \p{javaUpperCase} Equivalent to java.lang.Character.isUpperCase() To match an uppercase letter at the beginning of the string, you need the pattern ^\p{Lu} . Unfortunately, Java

jQuery Autocomplete with Special Characters (i.e. ö, Ä, é, or ß)

不问归期 提交于 2019-12-01 19:59:57
How can I have autocomplete match on words with special characters, such as those in German: ö, Ä, é, or ß. For example, I'd like "mun" to match "München" and "Munchen". David Cornish There's an excellent article on this at A List Apart which includes some Javascript code var accentMap = { 'á': 'a', 'é': 'e', 'í': 'i', 'ó': 'o', 'ú': 'u' }; function accent_fold(s) { if (!s) { return ''; } var ret = ''; for (var i = 0; i < s.length; i++) { ret += accent_map[s.charAt(i)] || s.charAt(i); } return ret; }; I use typeahead, and after hours of banging my head against a wall it was as simple as using

How to remove accents / diacritic marks from a string in Qt?

半腔热情 提交于 2019-12-01 18:21:09
How to remove diacritic marks from a string in Qt. For example, this: QString test = QString::fromUtf8("éçàÖœ"); qDebug() << StringUtil::removeAccents(test); should output: ecaOoe There is not straighforward, built-in solution in Qt. A simple solution, which should work in most cases, is to loop through the string and replace each character by their equivalent: QString StringUtil::diacriticLetters_; QStringList StringUtil::noDiacriticLetters_; QString StringUtil::removeAccents(QString s) { if (diacriticLetters_.isEmpty()) { diacriticLetters_ = QString::fromUtf8("ŠŒŽšœžŸ

Javascript Regex + Unicode Diacritic Combining Characters`

喜夏-厌秋 提交于 2019-12-01 18:17:22
I want to match this character in the African Yoruba language 'ẹ́'. Usually this is made by combining an 'é' with a '\u0323' under dot diacritic. I found that: 'é\u0323'.match(/[é]\u0323/) works but 'ẹ́'.match(/[é]\u0323/) does not work. I don't just want to match e. I want to match all combinations. Right now, my solution involves enumerating all combinations. Like so: /[ÁÀĀÉÈĒẸE̩Ẹ́É̩Ẹ̀È̩Ẹ̄Ē̩ÍÌĪÓÒŌỌO̩Ọ́Ó̩Ọ̀Ò̩Ọ̄Ō̩ÚÙŪṢS̩áàāéèēẹe̩ẹ́é̩ẹ̀è̩ẹ̄ē̩íìīóòōọo̩ọ́ó̩ọ̀ò̩ọ̄ō̩úùūṣs̩]/ Could there not be a shorter and thus better way to do this, or does regex matching in javascript of unicode diacritic

How to remove accents / diacritic marks from a string in Qt?

可紊 提交于 2019-12-01 18:00:35
问题 How to remove diacritic marks from a string in Qt. For example, this: QString test = QString::fromUtf8("éçàÖœ"); qDebug() << StringUtil::removeAccents(test); should output: ecaOoe 回答1: There is not straighforward, built-in solution in Qt. A simple solution, which should work in most cases, is to loop through the string and replace each character by their equivalent: QString StringUtil::diacriticLetters_; QStringList StringUtil::noDiacriticLetters_; QString StringUtil::removeAccents(QString s)