[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Right to Left string Manipulation

mikomarseillais

8/28/2008 2:24:00 PM

Description of the problem:

The context

I have to upload a file into sharepoint programmatically.
To do that i have to call â??Addâ? function on the chosen folder or list and
passing as parameter the url of the file.

The problem

I have to write the url programmatically and when I mix English and Hebrew I
donâ??t obtain the wanted url.

Sample:

I want to add a file named â??test.docxâ? in the location
http://myserver/mylist/myfolder/.
In my case I get the file name programmatically by looping into a folder in
my local computer.

So in my code I have to write :

string filename=myFileName( sample: â??test.docxâ?)
string UrlLocation= http://myserver/mylist/ת×?ק×?×?×?â?;
String Url=UrlLocation+filename;
myFolder.Add(Url);

The problem is that for the Url I obtain this value :
http://myserver/mylist/ test / ת×?ק×?×?×?.docx and not : http://myserver/mylist/
ת×?ק×?×?×? / test.docx .
In fact the â??/â? character disturb the concatenation.

I have already tested : StringBuilder, Encoding, bidi32.dll without success.

Thanks for help
2 Answers

vincent

8/28/2008 2:38:00 PM

0

Hi,

maybe you can try Path.Combine (
http://msdn.microsoft.com/en-us/library/system.io.path.co... ).

Vicenç

"mikomarseillais" wrote:

> Description of the problem:
>
> The context
>
> I have to upload a file into sharepoint programmatically.
> To do that i have to call â??Addâ? function on the chosen folder or list and
> passing as parameter the url of the file.
>
> The problem
>
> I have to write the url programmatically and when I mix English and Hebrew I
> donâ??t obtain the wanted url.
>
> Sample:
>
> I want to add a file named â??test.docxâ? in the location
> http://myserver/mylist/myfolder/.
> In my case I get the file name programmatically by looping into a folder in
> my local computer.
>
> So in my code I have to write :
>
> string filename=myFileName( sample: â??test.docxâ?)
> string UrlLocation= http://myserver/mylist/ת×?ק×?×?×?â?;
> String Url=UrlLocation+filename;
> myFolder.Add(Url);
>
> The problem is that for the Url I obtain this value :
> http://myserver/mylist/ test / ת×?ק×?×?×?.docx and not : http://myserver/mylist/
> ת×?ק×?×?×? / test.docx .
> In fact the â??/â? character disturb the concatenation.
>
> I have already tested : StringBuilder, Encoding, bidi32.dll without success.
>
> Thanks for help

mikomarseillais

8/28/2008 3:14:00 PM

0

Hi Vincent,

Thanks for your help.
I tested your idea but it doesn't work.
I found in a forum of Microsoft that there are no function in the .Net
framework to convert between Hebrew logical and visual layouts :
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=195951&wa=...

I hope there is a solution because i thinks that developpers who work with
right to left langages have solved this problem.

All ideas are welcome.

Thanks.




"Vincent" wrote:

> Hi,
>
> maybe you can try Path.Combine (
> http://msdn.microsoft.com/en-us/library/system.io.path.co... ).
>
> Vicenç
>
> "mikomarseillais" wrote:
>
> > Description of the problem:
> >
> > The context
> >
> > I have to upload a file into sharepoint programmatically.
> > To do that i have to call â??Addâ? function on the chosen folder or list and
> > passing as parameter the url of the file.
> >
> > The problem
> >
> > I have to write the url programmatically and when I mix English and Hebrew I
> > donâ??t obtain the wanted url.
> >
> > Sample:
> >
> > I want to add a file named â??test.docxâ? in the location
> > http://myserver/mylist/myfolder/.
> > In my case I get the file name programmatically by looping into a folder in
> > my local computer.
> >
> > So in my code I have to write :
> >
> > string filename=myFileName( sample: â??test.docxâ?)
> > string UrlLocation= http://myserver/mylist/ת×?ק×?×?×?â?;
> > String Url=UrlLocation+filename;
> > myFolder.Add(Url);
> >
> > The problem is that for the Url I obtain this value :
> > http://myserver/mylist/ test / ת×?ק×?×?×?.docx and not : http://myserver/mylist/
> > ת×?ק×?×?×? / test.docx .
> > In fact the â??/â? character disturb the concatenation.
> >
> > I have already tested : StringBuilder, Encoding, bidi32.dll without success.
> >
> > Thanks for help