none
stsadm, output to file, encoding problem RRS feed

  • Question

  • Hi,

    I am using 'stsadm -o enumgroups -url xxx > groups.xml' to collect a list of
    all groups at a given site.

    My problem is that the output file (using output redirection ">") is encoded in a way where all special
    language (Danish) characters are lost/replaced.

    Any suggestion ?

    PS. Special characters show up correctly in the command window.
    Thursday, May 7, 2009 12:10 PM

All replies

  • Hi,

    try to export it to .txt..

    Cheers,
    Daniel Bugday

    Web: SharePoint Forum Blog: Daniel Bugday's SharePoint Blog

    Thursday, May 7, 2009 12:46 PM
  • Hi,

    Makes no difference ...

    If I try to load the file (.xml) into Word I receive this error :

    The document xxx.xml cannot be opened because there are problems with the contents
    Details
    An invalid character was found in text content.
    Location: <line and column reference to the first national character in the file>

    So much for XML-support in Microsoft products :-(

    Sunday, May 10, 2009 2:14 PM
  • Hi,

    The default output encoding of the command prompt is ANSI.

     

    You could try to use CMD /U switch to force the command prompt using Unicode output.

     

    See Command-line reference: Cmd (http://technet.microsoft.com/en-us/library/bb490880.aspx) for more information.

     

    If Unicode output could not solve your issue, could you please copy some special characters to me for further research?

     

    Let me know the result if possible.

    -lambert


    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, May 11, 2009 9:50 AM
  • Hi,


    A: Output, CMD without /U
    -------------------------

    A.1 Output in command window
     <Group>
       <Name>KanSlettes-Gæster</Name> <- letter after "G" is special national letter
     </Group>

    A.2 Output in file (ANSI)
      <Group>
        <Name>KanSlettes-G‘ster</Name> <- letter after "G" is wrong - 91x
      </Group>
     
    B: Output, CMD with /U
    ----------------------

    B.1 Output in command window
     <Group>
       <Name>KanSlettes-Gæster</Name> <- letter after "G" is special national letter
     </Group>

    B.2 Output in file (UNICODE)
      <Group>
        <Name>KanSlettes-G‘ster</Name> <- letter after "G" is wrong - 91x (not UNICODE)
      </Group>

    The switch "/U" seems to be ignored ?

    Monday, May 11, 2009 11:12 AM
  • Hi,

    Based on my test, the /U switch will force the exported file using Unicode.

     

    I am afraid I did know Danish or had Danish system for further research.

     

    If this is a business critical issue, please contact Microsoft product/customer support services.

     

    If you are comfortable with coding, you could write a simple application to export the groups by SharePoint OM.

     

    Here is the property for your reference:

    SPWeb.Groups Property (Microsoft.SharePoint) (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.groups.aspx)

     

    Thanks for your understanding

    -lambert


    Lambert Qin | Microsoft Online Support Engineer
    How to ask a question in the forum (http://support.microsoft.com/kb/555375)
    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, May 13, 2009 10:01 AM