You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Wes Wannemacher (JIRA)" <ji...@apache.org> on 2009/06/17 15:15:43 UTC

[jira] Commented: (WW-3160) struts2 dtd problem

    [ https://issues.apache.org/struts/browse/WW-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46388#action_46388 ] 

Wes Wannemacher commented on WW-3160:
-------------------------------------

I just checked it - 

wesw@host:~/data/downloads/wget$ wget http://struts.apache.org/dtds/struts-2.0.dtd
--2009-06-17 09:11:16--  http://struts.apache.org/dtds/struts-2.0.dtd
Resolving struts.apache.org... 140.211.11.130
Connecting to struts.apache.org|140.211.11.130|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3391 (3.3K) [application/xml-dtd]
Saving to: `struts-2.0.dtd'

100%[==========================================================================================>] 3,391       --.-K/s   in 0s      

2009-06-17 09:11:16 (246 MB/s) - `struts-2.0.dtd' saved [3391/3391]

wesw@host:~/data/downloads/wget$ ls -ltr
total 7192
-rw-r--r-- 1 wesw wesw    3391 2009-01-13 14:45 struts-2.0.dtd
-rw-r--r-- 1 wesw wesw 7346413 2009-04-30 13:01 apache-tomcat-5.5.27.zip
wesw@host:~/data/downloads/wget$ vim struts-2.0.dtd  - 

:set
--- Options ---
  filetype=dtd        history=50          ruler               ttyfast
  helplang=en       nomodeline            syntax=dtd          ttymouse=xterm2
  backspace=indent,eol,start
  fileencoding=utf-8
  fileencodings=ucs-bom,utf-8,default,latin1
  printoptions=paper:letter
  runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,/var/lib/vim/add
ons/after,~/.vim/after
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
Press ENTER or type command to continue

As far as I know, encoding is not a function of file storage, it is a function of the application handling the file. The file is just a bunch of bytes, if your application attempts to read with the wrong encoding, you will see characters other than what you were meant to see. In my case, I wget'd it, opened it in ViM and then checked to make sure that ViM treated it as utf-8, then verified that the file contents are accurate.

That much being said, I'll admit that I'm naive on the topic and if you have further context or can explain how to change the file so that it better suits your need, then let me know.

> struts2 dtd problem
> -------------------
>
>                 Key: WW-3160
>                 URL: https://issues.apache.org/struts/browse/WW-3160
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 2.1.6
>         Environment: java 1.5, eclipse 3.4
>            Reporter: Kim Cholmin
>
> Hello my name is Kim cholmin
> I found that struts-2.0.dtd in your website has some problem
> when i use struts 2.0 , this dtd file include in xml file top.
> for example , 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
>     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>     "http://struts.apache.org/dtds/struts-2.0.dtd">
> and at the top of this file . encoding type stated clearly utf-8 like following sentence.
> <?xml version="1.0" encoding="UTF-8"?>
> but this file encoded ansi type. check it. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.