|
|
|
encoding + regular expressions или что делать с ÿ
|
|||
|---|---|---|---|
|
#18+
Привет! В .xml файле есть объект типа CDATA, содержащий JavaScript, парсящий строку сожержащую нестандартные символы. Требуется заменить их на что-нибудь попроще, например, ",". В UTF-8 символы выглядят как Код не мой, в тонкостях JS и кодировок совершенно не разбираюсь. Пытаюсь заменять как myString.replace(ÿ, ',') - не помогает. В логах Caused by ==> "?" is not defined. (org.mozilla.javascript.EcmaError)ReferenceError: "?" is not defined. (/page-downloader/link-extractor); line 126) at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597) at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557) at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1076) at org.mozilla.javascript.gen.c222.call(file:/D:/WebCollage/customers/kaid/build/project/settings/download-pages .xml#xpointer(/page-downloader/link-extractor):126) at com.webcollage.common.scripting.engine.JsEngine.rawRunFunction(JsEngine.java:420) at com.webcollage.common.scripting.engine.JsEngine.evalFunction(JsEngine.java:266) at com.webcollage.common.scripting.inxml.JsPluginBase.evaluateFunctionReference(JsPluginBase.java:228) at com.webcollage.contentreplicator.crawler.jsadapters.JsLinkExtractorFromInputStream.extractLinksJs(JsLinkExtra ctorFromInputStream.java:43) at com.webcollage.contentreplicator.crawler.jsadapters.JsLinkExtractorImpl.extractLinks(JsLinkExtractorImpl.java :45) at com.webcollage.contentreplicator.crawler.crawler.CrawlerThread.handleValidPageResponse(CrawlerThread.java:917 ) at com.webcollage.contentreplicator.crawler.crawler.CrawlerThread.handleValidResponse(CrawlerThread.java:862) at com.webcollage.contentreplicator.crawler.crawler.CrawlerThread.handleClassificationResponse(CrawlerThread.jav a:599) at com.webcollage.contentreplicator.crawler.crawler.CrawlerThread.responseAnalyzer(CrawlerThread.java:552) at com.webcollage.contentreplicator.crawler.crawler.CrawlerThread.handleGetRequest(CrawlerThread.java:509) at com.webcollage.contentreplicator.crawler.crawler.CrawlerThread.performDownload(CrawlerThread.java:280) at com.webcollage.contentreplicator.crawler.crawler.CrawlerThread.run(CrawlerThread.java:84) at java.lang.Thread.run(Thread.java:536) Может, кто-нибудь знает, как это решается? Заранее спасибо. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.12.2005, 04:11 |
|
||
|
encoding + regular expressions или что делать с ÿ
|
|||
|---|---|---|---|
|
#18+
недопечаталось:выглядят как ÿ ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.12.2005, 04:12 |
|
||
|
encoding + regular expressions или что делать с ÿ
|
|||
|---|---|---|---|
|
#18+
зачем JScript? нужно выставить нужную кодировку между компонентами Вашей системы. скорее всего это будет UTF-16. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.12.2005, 10:31 |
|
||
|
|

start [/forum/topic.php?fid=14&msg=33460364&tid=1334911]: |
0ms |
get settings: |
7ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
161ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
47ms |
get tp. blocked users: |
1ms |
| others: | 218ms |
| total: | 465ms |

| 0 / 0 |
