UIがWebでUnicodeな文字が入力できるのにデータ出力がCSVなんでCP932以外を弾くスクリプトを書いてみた
ありがたいことに
てなサイトがあったので、そこの表を忠実にチェックデータに落としました。力技です。
function isValidInCP932(value) { var length = value.length; for (var i = 0; i < length; i++) { var c = value.charAt(i); if (isValidInCP932.Table.indexOf(c, 0) == -1) { return c; } } return ""; } isValidInCP932.Table = " !\"#$%&'()*+,-./" + "0123456789:;<=>?" + "@ABCDEFGHIJKLMNO" + "PQRSTUVWXYZ[\\]^_" + "`abcdefghijklmno" + "pqrstuvwxyz{|}~ " + "。「」、・ヲァィゥェォャュョッ" + "ーアイウエオカキクケコサシスセソ" + "タチツテトナニヌネノハヒフヘホマ" + "ミムメモヤユヨラリルレロワン゙゚" + " 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\〜‖|…‥‘’“”()〔〕[]{}〈〉《》「」『』【】+−±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇" + "◆□■△▲▽▼※〒→←↑↓〓∈∋⊆⊇⊂⊃∪∩∧∨¬⇒⇔∀∃∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬ʼn♯♭♪†‡¶◯" + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをん" + "ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ" + "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω" + "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя" + "─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂" + /* 以下、延々とCP932な文字列が続く */ + "";
はてダに貼ると文字化けしちゃうから、あとでgithubにあげておきます。
あげました(2012.07.18追記)
今更ながら、htc EVO 3Dに機種変したのだが
今回はケースにはあまりお金掛けないでおこうっと。
ゼロ円端末だったし。
[asin:B005PJYB88:detail]
2月29日のPerfume新曲「Spring of Life」コメント動画のおしゃべりの英訳が完了しました!
会社の同僚にレビューしてもらいました!
#週末、字幕職人にならねば。なれるのか?>おれ
A:You of looking at Perfume Official Channel K:I'm Kasiyuka! A:I'm A-chan! N:I'm Nocchi! A:And, together... ALL:We are Perfume! A:Well, we Perfume, N:Yes! A:Our first new song of this year, "Spring of Life" will be released this spring! N:Great! We dit it! A:It's great song, and it's an absurdly popping song! N:Yes! K:It's very peppy song! A:It's glittering and peppy song! N:Ah, it is really true! A:This song is very catchy, A:and, this song was used in commercial video clip for HYO-KETSU. A:And it was shot in L.A! K:We are so cool! A:Hollywood! N:Hollywood! A:Yeah, I saw it! K:I saw Hollywood Sign A:Yes, I looked it. K:"Tomorrow, we will take video clips to a studio in Hollywood..." ALL:Wow! N:It's seems unreal? A:What shall we do!? A:Really it seems like a movie, eh? Anyway, they let us shoot video there. A:with very big set. A:Then, our beautiful music should played. N:It was cool! A:Yes! It will be on air from 29th of February, A:So, we want you to check out the KIRIN HYO-KETSU commercial! A:The song is called "Spring of Life"! A:Well, the release of this song was determined by UNIVERSAL MUSIC! N,K:Yes! A:Yeah, well, We said many years we would go to the world, A:so we also go up to the next step. Still we will do our best! A:We definitely want you to enjoy our new song A:and, we want you to dance while listening to the CM. A:I still want to talk a little more about Los Angeles, N:Yes! K:There are more things to say, aren't there. A:Well, we had a lot of happy news, A:We'll do our best Perfume in 2012! N,K:We do our best! A:Well, ALL:Bye-bye form Perfume!
2月29日のPerfume新曲「Spring of Life」コメント動画のおしゃべりを絶賛英訳中なのだが
#会社の同僚にレビューしてもらってます。。。
A:You of looking at Perfume Official Channel K:I'm Kasiyuka! A:I'm A-chan! N:I'm Nocchi! A:And, We three person are Perfume! ALL:Thanking you in advance! A:Well, we Perfume, N:Yes! A:The first new song of this year, "Spring of Life" will be released this spring! N:Great! We got it! A:It's great good song, and it's unreasonably popping song! N:Yes! K:It's very popping song! A:It's glittering and popping song! N:Ah, it is really true! A:This song is very catchy, A:and, this song was used in commercial video clip of HYO-KETSU, A:this video clip was took in L.A! How cool we are! K:We are so cool! A:Hollywood! N:Hollywood! A:At that time, I looked it. K:I looked Hollywood Sign A:Yes, I looked it. K:"Tomorrow, we will take video clips at studio in Hollywood..." ALL:Wow N:It's really? A:Highly what shall we do!? A:Really we got to shoot a movie in place A:with very big set. A:Then, our great music should resound. N:It's cool! A:Yes! It will be on air from February 28, A:we want you to check commercial video clip of KIRIN HYO-KETSU! A:The song name is "Spring of Life"! A:Well, release was determined by UNIVASAL MUSIC from this song! N,K:Yes! A:We said many years we would go to the world, A:so we also go up to the next step. Still we will do our best! A:Come, you, we want you to look forward to this new our song, A:and, we want dancing together listening to the CM. A:I still want to talk a little later in the Los, N:Yes! K:We had various! A:Well, we had a lot of happy news, A:we also will do our best Perfume in 2012! N,K:We do our best! A:Then, ALL:Perfume sent to you.
2月29日のPerfume新曲「Spring of Life」コメント動画に英語字幕を入れようと思うのだが
取り敢えず、動画を見ながら小一時間、テープ起こしっぽい作業をやってました。
細かい頷きとか網羅してなさげですけど、致命的な漏れって無いですかね?
レビューをお願いします。m(_ _)m
A:Perfume Official Channelをご覧の皆さん K:かしゆかです! A:あーちゃんです! N:のっちです! A:3人合わせて ALL:Perfumeです!よろしくお願いします! A:えー、私達Perfume、 N:はい A:今年初となる新曲!「Spring of Life」が春にリリース決定しました! N:やったー!良かったー! A:すっごいいい曲です。もう、めちゃくちゃ弾ける! N:そう! K:すっごい弾けてる! A:もう、キラキラはじける! N:あははは、本当にはい。 A:とってもキャッチーですし、 A:あのー、こちらの曲はあのーCMをまた氷結さんでやらせてもらったんですけど、 A:なんと、えー、ロスでの撮影 K:カッコイイ A:ハリウッド N:ハリウッド A:あの、見ました K:ハリウッドサイン見て A:見て K:ハリウットのスタジオでじゃあ明日撮影なんで ALL:えー N:うそみたいー! A:超どうしよう! A:本当、映画みたいなね、ところでね、撮影させてもらって A:おっきなセットとねー A:それで私達の素敵な曲が鳴り響いて N:カッコイイ A:ねー、是非2月29日からオンエアですので A:こちらもキリン氷結さんのCM、見てみて下さい! A:「Spring of Life」という曲です。 A:今回の曲からからえーとUNIVASAL MUSICさんでリリースが決まりました N,K:はい! A:いやーもうね、世界にも行きましょうと私達も何年も言っておりますので A:また私達次のステップへ上がれそうです。まだまだ頑張ります A:是非、皆さん、私達の今回の中の新曲を楽しみにしといて欲しいし、 A:CMを聴いて一緒にダンスを踊って欲しいし、 A:あとロスでの話しをまだまだちょっとしたいけど N:そうですね K:いろいろありますね。 A:いやー、もうニュースたくさん嬉しい限りです A:2012年もPerfume頑張りますー! N,K:頑張ります! A:それでは、 ALL:Perfumeでしたー!
DisplayPort-DVI変換ケーブルの最安値?
これっぽいです。
- 出版社/メーカー: ペリメント
- メディア: エレクトロニクス
- クリック: 22回
- この商品を含むブログ (1件) を見る
DisplayPortのメモリースティックみたいな規格にあまりお金払いたくないしw
今更ながらアジャイルサムライを買ってみた
- 作者: Jonathan Rasmusson,西村直人,角谷信太郎,近藤修平,角掛拓未
- 出版社/メーカー: オーム社
- 発売日: 2011/07/16
- メディア: 単行本(ソフトカバー)
- 購入: 42人 クリック: 1,991回
- この商品を含むブログ (246件) を見る
【2012.03.06追記】読了しました。つまりは過去日記ですw
とても判りやすく、読みやすく、しかも楽しめました。
挿絵がキュートでキャッチーで、文章が簡潔に面白く書いてあり、しかもアジャイル開発に必要なことを網羅している*1。
受託開発のプロジェクトだと本書の効果は絶大ですが、著者はそうじゃないプロジェクト・職場・会社への配慮もしています。
そして「価値のあるソフトウェアを顧客に届けること」について愚直なまでにあなたに問いかけます。「アジャイな見積りと計画づくり」だと挫折するかも知れませんが、ソフトウェアを志したものならば本書は読み通せるでしょう*2。
「アジャイルサムライ - 達人開発者への道」は皆さんにお勧めですが、特にエンジニアとして歩み始めた若い人*3や、今時の技術からちょっと離れちゃったリーダー格の人にお勧めです。
アジャイルな見積りと計画づくり ~価値あるソフトウェアを育てる概念と技法~
- 作者: Mike Cohn,マイクコーン,安井力,角谷信太郎
- 出版社/メーカー: 毎日コミュニケーションズ
- 発売日: 2009/01/29
- メディア: 単行本(ソフトカバー)
- 購入: 74人 クリック: 764回
- この商品を含むブログ (223件) を見る