Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using Two Replacement Function inside Common.vbUsing Two Replacement Function inside Common.vb
Previous
 
Next
New Post
3/7/2009 8:33 AM
 

I' m using a third party module (Ventrian News Articles) and i love this module. But one thing which does not make me happy is: it removes one character from url if i  use this character in my article title.

In earlier releases, we worked on a solution for Turkish community to replace characters in url. And it worked great. But lately other people from various countries also wanted to have similar feature, Scott decided to implement a global way to do replacements. So far so good. It almost replaces all characters. But except one.

ı is not being replaced with i.

Have you seen something like this before?

I'm going to attach both files, in case someone would like to help me to implement it to new version.

Note: I have zero knowledge on Visual Basic. I will stick to your ideas. We can also use Teamviewer to connect and view the problem. If anoyne interested i can show the exact problem with my virtual pc.

Here are the related files:

http://www.mikroproje.com/Portals/0/Common_vb_files.rar

I really appreciate your help.

Thanks.

 


Or-Rouge Team Or-Rouge
Personally recommend Hostgator for hosting single or multiple DotNetNuke Websites.
DotNetNuke Tips and Tutorials
Install DotNetNuke to Godaddy root
DotNetNuke Türkçe Hakkinda Hersey
 
New Post
3/7/2009 2:05 PM
 

Ismet, 

please send me the files by email as a zip archive and I will have a look how to integrate it into the framework.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/8/2009 11:57 AM
 

Sebastian Leupold wrote

please send me the files by email as a zip archive and I will have a look how to integrate it into the framework.

I don't mind rar files, so I took at look at the problem.

Looks like the issue is in the RemoveDiacritics function in the 07.31 file. It seems like it does a great job at replacing everything except the dotless i character. The other file, the 05.74, has a function that targets the turkish character codes. If you want a quick fix, just copy the ReplaceTrChars function from the 05.74 file, and paste it into the 07.31 file... I'm on the way out to breakfast, but if this is still unanswered when I return I'll provide the exact bits you'll need to fix this...

 


 

<%= RemoveDiacritics("hålçoıi")%>

<script language="vb" runat="server">
     Public Shared Function RemoveDiacritics(ByVal s As String) As String

            s = s.Normalize(System.Text.Normalizationform.formD)

            Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder()

            Dim i As Integer

            For i = 0 To s.Length - 1
        If CharUnicodeInfo.GetUnicodeCategory(s(i)) <> UnicodeCategory.NonSpacingMark Then

                    sb.Append(s(i))

        End If

            Next

            Return sb.ToString().Normalize(System.Text.Normalizationform.formC)
        End Function
</script>

 


 

 
New Post
3/8/2009 4:53 PM
 

I'm really not sure why the function isn't replacing the dotless i, however this is a quick hack to get you going...  As this is really a commercial module, I'm not going to spend anymore time fixing their code...

     Public Shared Function RemoveDiacritics(ByVal s As String) As String

            s = s.Normalize(System.Text.Normalizationform.formD)
            Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder()
            Dim i As Integer

            For i = 0 To s.Length - 1
                If CharUnicodeInfo.GetUnicodeCategory(s(i)) <> UnicodeCategory.NonSpacingMark Then
                    If s(i) = ChrW(305)
                        sb.Append("i"c)
                    Else
                        sb.Append(s(i))
                    End If
                End If

            Next

            Return sb.ToString().Normalize(System.Text.Normalizationform.formC)
        End Function

 
New Post
3/10/2009 5:41 AM
 

 Oliver, 

if you nailed this issue down, please log the issue and fix to Gemini to get it integrated into next release. thank you.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using Two Replacement Function inside Common.vbUsing Two Replacement Function inside Common.vb


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out