# Encoding "space" character

**URL:** <https://forum.robotframework.org/t/encoding-space-character/1929>\
**Category:** Robot Framework\
**Created:** [10 June 2021 14:46 UTC](https://forum.robotframework.org/t/encoding-space-character/1929 "2021-06-10T14:46:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Centaure13](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@Centaure13](https://forum.robotframework.org/u/Centaure13)\
**Post date:** [10 June 2021 14:46 UTC](https://forum.robotframework.org/t/encoding-space-character/1929/1 "2021-06-10T14:46:37Z")

</div>

Hello,

I would like to encoding the “space” character but I fail.

On a webpage, the text is "Location :&nbsp;"  
On my RF code, I have this check :  
Element Text Should Be locator LOCATION :

But when I execute this part of code, the execution fails with this message :  
FAIL : The text of element ‘locator’ should have been ‘LOCATION :’ but it was 'LOCATION : '.

How can I say to RF “translate the space character at the end of the line” ?  
I tried many solution but nothing has worked.

Thanks a lot

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [10 June 2021 17:20 UTC](https://forum.robotframework.org/t/encoding-space-character/1929/2 "2021-06-10T17:20:43Z")

</div>

How about using ‘single quotes’?  
Or trying with:  
`Element Text Should Be locator LOCATION :${SPACE}`

---

<div class="post-metadata">

**Author:** ![Centaure13](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@Centaure13](https://forum.robotframework.org/u/Centaure13)\
**Post date:** [11 June 2021 05:36 UTC](https://forum.robotframework.org/t/encoding-space-character/1929/3 "2021-06-11T05:36:43Z")

</div>

Hello !  
The single quote doesn’t work.  
But… ${SPACE} works fine !!

Thank you 🙂
