You are viewing limited content. For full access, please sign in.

Question

Question

Renaming a document with a £ symbol

asked on February 23, 2015 Show version history

Hi all,

Using the SDK I am trying to rename documents and get an "Invalid Request" error when trying to rename a document if the new name has a £ in the name.

In the Laserfiche client I can rename a document using a £.

anyone know why?

Do I need to escape the £ and if so what escape character do I use?

I also get the error with the < > \ symbols.

Using 9.2 and RA

 

Andrew 

 

 

2 0

Answer

SELECTED ANSWER
replied on February 23, 2015

I can reproduce the problem, it seems to be an issue with the System.Uri class that RA is using internally. If i switch my sample project from .net4.5 to .net4, i can rename with the £ character. We will look into fixing this for a future release.

3 0
replied on February 23, 2015

That explains why I was unable to reproduce it.  I was only testing with .Net 4.0

0 0

Replies

replied on February 23, 2015 Show version history

Andrew - I also thought you might have to escape the '£' character or use the Chr(156) but this code below works in a Workflow SDK script activity so I assume it will work in an SDK app;

            Dim docInfo as DocumentInfo = Me.BoundEntryInfo
            
            docInfo.Lock(LockType.Exclusive)
            docInfo.RenameTo("This document will sell for £100")
            docInfo.Unlock
            

Note: I used the ALT+156 (Numeric keypad) to insert the '£' symbol in the string

0 0
replied on February 23, 2015

Thanks Cliff,

Unfortunately that did not work.

I tried inserting the unicode value for the £ and converting the string  to ascii £ became ?

 Andrew

0 0
replied on February 23, 2015

I tried inserting the unicode value for the £ and converting the string  to ascii £ became ?

 

There is no pound symbol in the ASCII character set, so there's no way for a conversion to succeed with full fidelity.  Does Cliff's code work for you?  Or can you post the full code that's not working?

replied on February 23, 2015

Can you post a snippet of the code you are using to rename the document?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.