Not rated yet. You must be logged in to rate this video.
Not rated yet. You must be logged in to rate this video.
Categories About This Blog(6) Book Reviews(8) Character Encodings(12) Conferences(4) Deadly Regular Expressions(4) Early Steps(4) Higher-Order Ruby(6) Key-Value Stores(7) Language Comparisons(4) My Heroes(2) My Projects(5) Non-code(4) Rails(4) Rubies in the Rough(24) Ruby Tutorials(4) Ruby Voodoo(12) Rusting(5) Screencasts(3) Terminal Tricks(4) The Gateway(4) The Ruby VM Interview(6) The Standard
Mechanizeãã¨ãã©ãæ¥æ¬èªã®ãã¼ã¸ã§æååãããã®ã§ãåå ã¨è§£æ±ºæ¹æ³ã調ã¹ã¦ã¿ãã確èªãããã¼ã¸ã§ã³ã¯æ¬¡ã®éãã Ruby 1.9.1-p378ã¨1.8.6-p111ï¼Ubuntuã®ããã±ã¼ã¸ï¼ Mechanize 1.0.0 Nokogiri 1.4.2 libxml2 2.6.31ï¼Ubuntuã®ããã±ã¼ã¸ï¼ ã¨ã³ã³ã¼ãã£ã³ã°ã®æ±ã Mechanizeã®å é¨ã¨ã³ã³ã¼ãã£ã³ã°ã¯UTF-8ã«åºå®ããã¦ãã¦ãããã¥ã¡ã³ãã®ã¨ã³ã³ã¼ãã£ã³ã°ãä½ã§ããUTF-8ã«å¤æããããããã¯MechanizeãHTMLãã¼ãµã«ä½¿ã£ã¦ããNokogiriã®ä»æ§ã§ãããNokogiriãä¾åãã¦ããlibxml2ã®ä»æ§ã§ããããããããäºæ ã§Mechanizeããåãåºããæååã¯ãã¹ã¦UTF-8ã«ãªã£ã¦ãããRuby 1.9ã ã¨String#encodingã¯Encoding::UTF_8ã«ã»ããã
(English) Wiki links UTF-8ç°å¢ã®vimã§ãéUTF-8ã¨ã³ã³ã¼ãã£ã³ã°ã®ãã¡ã¤ã«ãæ±ãæ¹æ³ vimãUTF-8ç°å¢ã§åããã¦ããã°ãå é¨ã§ã¯ããã¨ããããæåãããã¹ããã¼ã¿ã¼ã¨ãã¦æ±ãã¾ãããã ãããã¹ããã¼ã¿ã¼ã¯å¿ ãããUTF-8ã§ã¯ä¿åããã¦ãã¾ãããããã§éUTF-8ã¨ã³ã³ã¼ãã£ã³ã°ã®ãã¡ã¤ã«ãæ±ãéã«ã¯ãiconvã§ãã¡ã¤ã«ã®ã¨ã³ã³ã¼ãã£ã³ã°ãå¾å¾©ã§å¤æãã¦ããå¿ è¦ãããã¾ããå¤æã§ããã¨ã³ã³ã¼ãã£ã³ã°ã®é¸æè¢ã¯iconv -lã³ãã³ããããã¨ä¸è¦§ã§ãã¾ããï¼ã¨ã³ã³ã¼ãã£ã³ã°åã®å¦çã¯å¤§æåã»å°æååºå¥ããã¾ãããããã¤ãã³ãã¢ã³ãã¼ã¹ã³ã¢ã¯åºå¥ããã¾ããï¼ãã ãä¸ã ããã¥ã¢ã«ã§å¾å¾©å¤æããã®ã¯é¢åã§ãã®ã§ãvimããç°¡åã«ã¨ã³ã³ã¼ãå¤æã«ã¢ã¯ã»ã¹ããæ¹æ³ã以ä¸ã«è¨ãã¾ãã ã¡ãªã¿ã«UTF-8ç°å¢ä¸ã§ã®æ¨æºçãªvimã¯fileencodings=ucs-
ã¯ããã« æ¬ææ¸ã¯ãruby 1.9 ã«å°å ¥ããã M17N 対å¿ã«ã¤ãã¦ã調æ»ããçµæã調æ»ã«é¢ããä½æ¥ãã°ã§ããã 調æ»ã®ç®çã¯ãç§ãã¡ã³ããã³ã¹ãã¦ãã Ruby ã® Readline ã¢ã¸ã¥ã¼ã«ãæè¿ (2008 å¹´ 10 æ 25 æ¥ç¾å¨ ) å°å ¥ããã Encode.default_internal ã«å¯¾å¿ããããã®ç¥èãã¤ãããã¨ã§ããã ç¨èª æ¬ææ¸ã§ä½¿ç¨ããç¨èªãå®ç¾©ããã Ruby ã¹ã¯ãªãã ããã°ã©ãã³ã°è¨èª Ruby ã§è¨è¿°ããããã°ã©ã ãã¾ãããã®ããã°ã©ã ãå«ããã¡ã¤ã«ã ã¹ã¯ãªããã¨ã³ã³ã¼ãã£ã³ã° Ruby ã¹ã¯ãªãããè¨è¿°ãã¦ããæååã®ã¨ã³ã³ã¼ãã£ã³ã°ãUTF-8 ã®æååãªãã©ã«ãæ£è¦è¡¨ç¾ãè¨è¿°ãã¦ãã Ruby ã¹ã¯ãªããã®ã¹ã¯ãªããã¨ã³ã³ã¼ãã£ã³ã°ã¯ãUTF-8 ã§ããå¿ è¦ããããã¹ã¯ãªããã¨ã³ã³ã¼ãã£ã³ã°ãä¸æ£ãªå ´åãã³ã³ãã¤ã«ã¨ã©ã¼ãçºçããã
Lately, with my friend and colleague Joseph, we made some experiments with the Sinatra Ruby Framework. As part of the experiment weâve chosen to stick with our DB of choice PostgreSQL and our preferred template engine HAML, but we decided to give the Sequel ORM a try as well as using Ruby 1.9.1. We also wanted to store our datas as UTF-8 (this part is the most painful of all). Our first goal was t
sinatraã¨ActiveRecordã¨ERBã§BBSä½ã£ãã®ã§ã½ã¼ã¹ãå ¬éãã¦ã¿ã - ã ãããã«è§¦çºããã¦ä¿ºãBBSãä½ã£ã¦ã¿ããã¨ãããæ°æ¥Sinatraãããã£ã¦ãããSinatraããã¯æè¿ãã¼ã¸ã§ã³ã¢ãããã¦ãæ°ããããã©ãã©ãããã¡ããã¨Ruby1.9.1ã§ãåãããã ãç´ æµã ã§ãé 調ã«è¡ããã¨æã£ããã ãã©ãã©ãã«ãæ¸ãè¾¼ã¿ã®specãéããªããããã§åãã¦ãPOSTãGETã§ãã©ã¡ã¼ã¿ã«ãã«ããã¤ãã®æååãå ¥ã£ã¦ãã¨ä½ããããããã¨ã«æ°ä»ããã æåã«æ¸ããspecã¨ã¢ããªå´ã®ã³ã¼ããæç²ã # coding: utf-8 require 'rubygems' require 'rack/test' require 'routes.rb' #sinatraã¢ã㪠set :environment, :test include Rack::Test::Methods
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}